diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-13 14:14:53 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-13 14:14:53 +0000 |
commit | bcfc22b10e30771e692f7716a1fec7577373963e (patch) | |
tree | 5e8442fc328f3e322069070a678141837e1e9c9b /vm_core.h | |
parent | e504a81ff11c8611f06d54a23b355fed90b356ab (diff) | |
download | ruby-bcfc22b10e30771e692f7716a1fec7577373963e.tar.gz |
* thread_pthread.c: rewrite GVL completely.
* thread_win32.c: ditto.
* thread_pthread.h: ditto.
* vm_core.h: ditto.
* thread.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -419,7 +419,6 @@ typedef struct rb_thread_struct { rb_thread_id_t thread_id; enum rb_thread_status status; int priority; - int slice; native_thread_data_t native_thread_data; void *blocking_region_buffer; @@ -484,6 +483,7 @@ typedef struct rb_thread_struct { #ifdef USE_SIGALTSTACK void *altstack; #endif + unsigned long running_time_us; } rb_thread_t; /* iseq.c */ @@ -673,6 +673,9 @@ extern rb_vm_t *ruby_current_vm; #define GET_THREAD() ruby_current_thread #define rb_thread_set_current_raw(th) (void)(ruby_current_thread = (th)) #define rb_thread_set_current(th) do { \ + if ((th)->vm->running_thread != (th)) { \ + (th)->vm->running_thread->running_time_us = 0; \ + } \ rb_thread_set_current_raw(th); \ (th)->vm->running_thread = (th); \ } while (0) |