diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-08 11:51:40 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-08 11:51:40 +0000 |
commit | ae317b518c4dcbcbf0ed02bb9e6cd7513f0a34fe (patch) | |
tree | bea8c1e7d17a5cef63673a71adcc3ca797675bfe /thread_win32.ci | |
parent | 93b2cfbc4a5572f8f00cfda931fff543ab598c4a (diff) | |
download | ruby-ae317b518c4dcbcbf0ed02bb9e6cd7513f0a34fe.tar.gz |
* 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 'thread_win32.ci')
-rw-r--r-- | thread_win32.ci | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/thread_win32.ci b/thread_win32.ci index e8d7facbaf..dd9a24aad1 100644 --- a/thread_win32.ci +++ b/thread_win32.ci @@ -18,7 +18,7 @@ #undef Sleep #define native_thread_yield() Sleep(0) -#define yarv_remove_signal_thread_list(th) +#define remove_signal_thread_list(th) static void Init_native_thread() @@ -93,6 +93,9 @@ w32_wait_event(HANDLE event, DWORD timeout, rb_thread_t *th) return ret; } +static void ubf_handle(rb_thread_t *th); +#define ubf_select ubf_handle + static void native_sleep(rb_thread_t *th, struct timeval *tv) { @@ -109,11 +112,11 @@ native_sleep(rb_thread_t *th, struct timeval *tv) DWORD ret; int status = th->status; th->status = THREAD_STOPPED; - th->interrupt_function = native_thread_interrupt; + th->unblock_function = ubf_handle; thread_debug("native_sleep start (%d)\n", (int)msec); ret = w32_wait_event(0, msec, th); thread_debug("native_sleep done (%d)\n", ret); - th->interrupt_function = 0; + th->unblock_function = 0; th->status = status; } GVL_UNLOCK_END(); @@ -283,9 +286,9 @@ native_thread_apply_priority(rb_thread_t *th) } static void -native_thread_interrupt(rb_thread_t *th) +ubf_handle(rb_thread_t *th) { - thread_debug("native_thread_interrupt: %p\n", th); + thread_debug("ubf_handle: %p\n", th); SetEvent(th->native_thread_data.interrupt_event); } |