diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 19:00:03 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 19:00:03 +0000 |
commit | 8ee7d0767f7940baeae60ffa95afde93f3378c93 (patch) | |
tree | 2f90c7d6ab23acba9e00fa773fb76673123db3f8 /thread_pthread.ci | |
parent | b1c6339b0c2d3288eab5c45cb86ecd30c9b0dc9d (diff) | |
download | ruby-8ee7d0767f7940baeae60ffa95afde93f3378c93.tar.gz |
* blockinlining.c, compile.c, compile.h, error.c, eval.c,
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h,
eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c,
process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci,
vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def,
yarv.h, yarvcore.h, yarvcore.c: change type and macro names:
* yarv_*_t -> rb_*_t
* yarv_*_struct -> rb_*_struct
* yarv_tag -> rb_vm_tag
* YARV_* -> RUBY_VM_*
* proc.c, vm.c: move functions about env object creation
from proc.c to vm.c.
* proc.c, yarvcore.c: fix rb_cVM initialization place.
* inits.c: change Init_ISeq() order (after Init_VM).
* ruby.h, proc.c: change declaration place of rb_cEnv
from proc.c to ruby.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r-- | thread_pthread.ci | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci index fe7086dc61..c5f2ebbac7 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -21,10 +21,10 @@ #define native_cleanup_pop pthread_cleanup_pop #define native_thread_yield() sched_yield() -static void yarv_add_signal_thread_list(yarv_thread_t *th); -static void yarv_remove_signal_thread_list(yarv_thread_t *th); +static void yarv_add_signal_thread_list(rb_thead_t *th); +static void yarv_remove_signal_thread_list(rb_thead_t *th); -static yarv_thread_lock_t signal_thread_list_lock; +static rb_thread_lock_t signal_thread_list_lock; static void null_func() @@ -40,10 +40,10 @@ Init_native_thread() } NOINLINE(static int - thread_start_func_2(yarv_thread_t *th, VALUE *stack_start)); + thread_start_func_2(rb_thead_t *th, VALUE *stack_start)); void static thread_cleanup_func(void *th_ptr); -static yarv_thread_t *register_cached_thread_and_wait(void); +static rb_thead_t *register_cached_thread_and_wait(void); #define USE_THREAD_CACHE 0 @@ -54,7 +54,7 @@ thread_start_func_1(void *th_ptr) thread_start: #endif { - yarv_thread_t *th = th_ptr; + rb_thead_t *th = th_ptr; VALUE stack_start; /* ignore self and klass */ @@ -70,7 +70,7 @@ thread_start_func_1(void *th_ptr) #if USE_THREAD_CACHE if (1) { /* cache thread */ - yarv_thread_t *th; + rb_thead_t *th; if ((th = register_cached_thread_and_wait()) != 0) { th_ptr = (void *)th; th->thread_id = pthread_self(); @@ -86,18 +86,18 @@ void rb_thread_create_control_thread(void); static pthread_mutex_t thread_cache_lock = PTHREAD_MUTEX_INITIALIZER; struct cached_thread_entry { - volatile yarv_thread_t **th_area; + volatile rb_thead_t **th_area; pthread_cond_t *cond; struct cached_thread_entry *next; }; struct cached_thread_entry *cached_thread_root; -static yarv_thread_t * +static rb_thead_t * register_cached_thread_and_wait(void) { pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - volatile yarv_thread_t *th_area = 0; + volatile rb_thead_t *th_area = 0; struct cached_thread_entry *entry = (struct cached_thread_entry *)malloc(sizeof(struct cached_thread_entry)); @@ -140,11 +140,11 @@ register_cached_thread_and_wait(void) } pthread_mutex_unlock(&thread_cache_lock); - return (yarv_thread_t *)th_area; + return (rb_thead_t *)th_area; } static int -use_cached_thread(yarv_thread_t *th) +use_cached_thread(rb_thead_t *th) { int result = 0; #if USE_THREAD_CACHE @@ -170,7 +170,7 @@ use_cached_thread(yarv_thread_t *th) } static int -native_thread_create(yarv_thread_t *th) +native_thread_create(rb_thead_t *th) { int err = 0; @@ -215,7 +215,7 @@ native_thread_join(pthread_t th) } static void -native_thread_apply_priority(yarv_thread_t *th) +native_thread_apply_priority(rb_thead_t *th) { struct sched_param sp; int policy; @@ -237,14 +237,14 @@ native_thread_apply_priority(yarv_thread_t *th) } static void -interrupt_using_pthread_cond_signal(yarv_thread_t *th) +interrupt_using_pthread_cond_signal(rb_thead_t *th) { thread_debug("interrupt_using_pthread_cond_signal (%p)\n", th); pthread_cond_signal(&th->native_thread_data.sleep_cond); } static void -native_thread_send_interrupt_signal(yarv_thread_t *th) +native_thread_send_interrupt_signal(rb_thead_t *th) { thread_debug("native_thread_send_interrupt_signal (%p)\n", th->thread_id); if (th) { @@ -253,7 +253,7 @@ native_thread_send_interrupt_signal(yarv_thread_t *th) } static void -native_sleep(yarv_thread_t *th, struct timeval *tv) +native_sleep(rb_thead_t *th, struct timeval *tv) { int prev_status = th->status; struct timespec ts; @@ -308,13 +308,13 @@ native_sleep(yarv_thread_t *th, struct timeval *tv) } static void -native_thread_interrupt(yarv_thread_t *th) +native_thread_interrupt(rb_thead_t *th) { yarv_add_signal_thread_list(th); } struct yarv_signal_thread_list { - yarv_thread_t *th; + rb_thead_t *th; struct yarv_signal_thread_list *prev; struct yarv_signal_thread_list *next; }; @@ -345,7 +345,7 @@ print_signal_list(char *str) } static void -yarv_add_signal_thread_list(yarv_thread_t *th) +yarv_add_signal_thread_list(rb_thead_t *th) { if (!th->native_thread_data.signal_thread_list) { FGLOCK(&signal_thread_list_lock, { @@ -371,7 +371,7 @@ yarv_add_signal_thread_list(yarv_thread_t *th) } static void -yarv_remove_signal_thread_list(yarv_thread_t *th) +yarv_remove_signal_thread_list(rb_thead_t *th) { if (th->native_thread_data.signal_thread_list) { FGLOCK(&signal_thread_list_lock, { |