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 | 6f088f38bd8ec794671c018ca9c6e79e580c2acb (patch) | |
| tree | bea8c1e7d17a5cef63673a71adcc3ca797675bfe /thread_win32.ci | |
| parent | 80bca9d9b60c13c13f3b9fbab1091250dc5c039a (diff) | |
| download | ruby-6f088f38bd8ec794671c018ca9c6e79e580c2acb.tar.gz ruby-6f088f38bd8ec794671c018ca9c6e79e580c2acb.tar.xz ruby-6f088f38bd8ec794671c018ca9c6e79e580c2acb.zip | |
* 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: http://svn.ruby-lang.org/repos/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 e8d7facba..dd9a24aad 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); } |
