summaryrefslogtreecommitdiff
path: root/yarvcore.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-08 11:51:40 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-08 11:51:40 +0000
commitae317b518c4dcbcbf0ed02bb9e6cd7513f0a34fe (patch)
treebea8c1e7d17a5cef63673a71adcc3ca797675bfe /yarvcore.h
parent93b2cfbc4a5572f8f00cfda931fff543ab598c4a (diff)
* yarvcore.h, thread.c: fix to use pthread on cygwin.
* yarvcore.h, thread.c: move GVL_UNLOCK_BEGIN() and GVL_UNLOCK_END() from yarvcore.h to thread.c. * thread.c: change GVL_UNLOCK_RANGE() arguments (adding ubf as 2nd argument). * thread.c: fix to use polling in select on cygwin and mswin32. * thread.c, thread_pthread.ci, thread_win32.ci, yarvcore.h: rename: * rb_thread_t#interrupt_function -> unblock_function * rb_interrupt_function_t -> rb_unblock_function * some interrupt function name -> ubf_* * yarv_* -> * git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvcore.h')
-rw-r--r--yarvcore.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/yarvcore.h b/yarvcore.h
index 8bfe5fe20fe..4d98f42b907 100644
--- a/yarvcore.h
+++ b/yarvcore.h
@@ -24,7 +24,7 @@
#include "debug.h"
#include "vm_opts.h"
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32)
#include "thread_win32.h"
#elif defined(HAVE_PTHREAD_H)
#include "thread_pthread.h"
@@ -376,7 +376,7 @@ struct rb_vm_tag {
struct rb_vm_tag *prev;
};
-typedef void rb_interrupt_function_t(struct rb_thread_struct *);
+typedef void rb_unblock_function_t(struct rb_thread_struct *);
#define RUBY_VM_VALUE_CACHE_SIZE 0x1000
#define USE_VALUE_CACHE 1
@@ -423,7 +423,7 @@ typedef struct rb_thread_struct
int exec_signal;
int interrupt_flag;
- rb_interrupt_function_t *interrupt_function;
+ rb_unblock_function_t *unblock_function;
rb_thread_lock_t interrupt_lock;
struct rb_vm_tag *tag;
@@ -632,19 +632,6 @@ extern rb_vm_t *theYarvVM;
#error "unsupported thread model"
#endif
-#define GVL_UNLOCK_BEGIN() do { \
- rb_thread_t *_th_stored = GET_THREAD(); \
- rb_gc_save_machine_context(_th_stored); \
- native_mutex_unlock(&_th_stored->vm->global_interpreter_lock)
-
-#define GVL_UNLOCK_END() \
- native_mutex_lock(&_th_stored->vm->global_interpreter_lock); \
- rb_thread_set_current(_th_stored); \
-} while(0)
-
-NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
-NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
-
void rb_thread_execute_interrupts(rb_thread_t *);
#define RUBY_VM_CHECK_INTS_TH(th) do { \