ruby-changes:13909
From: akr <ko1@a...>
Date: Wed, 11 Nov 2009 08:34:22 +0900 (JST)
Subject: [ruby-changes:13909] Ruby:r25713 (trunk): * thread.c (blocking_region_begin): define before BLOCKING_REGION.
akr 2009-11-11 08:34:03 +0900 (Wed, 11 Nov 2009) New Revision: 25713 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25713 Log: * thread.c (blocking_region_begin): define before BLOCKING_REGION. reported by Luis Lavena. [ruby-core:26670] Modified files: trunk/ChangeLog trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 25712) +++ ChangeLog (revision 25713) @@ -1,3 +1,8 @@ +Wed Nov 11 08:32:45 2009 Tanaka Akira <akr@f...> + + * thread.c (blocking_region_begin): define before BLOCKING_REGION. + reported by Luis Lavena. [ruby-core:26670] + Wed Nov 11 08:22:19 2009 Tanaka Akira <akr@f...> * util.c (ruby_strtod): use dval() consistently. Index: thread.c =================================================================== --- thread.c (revision 25712) +++ thread.c (revision 25713) @@ -122,6 +122,17 @@ GVL_UNLOCK_END(); \ } while(0); +#define blocking_region_begin(th, region, func, arg) \ + do { \ + (region)->prev_status = (th)->status; \ + (th)->blocking_region_buffer = (region); \ + set_unblock_function((th), (func), (arg), &(region)->oldubf); \ + (th)->status = THREAD_STOPPED; \ + thread_debug("enter blocking region (%p)\n", (void *)(th)); \ + RB_GC_SAVE_MACHINE_CONTEXT(th); \ + native_mutex_unlock(&(th)->vm->global_vm_lock); \ + } while (0) + #define BLOCKING_REGION(exec, ubf, ubfarg) do { \ rb_thread_t *__th = GET_THREAD(); \ struct rb_blocking_region_buffer __region; \ @@ -987,16 +998,6 @@ } /* blocking region */ -#define blocking_region_begin(th, region, func, arg) \ - do { \ - (region)->prev_status = (th)->status; \ - (th)->blocking_region_buffer = (region); \ - set_unblock_function((th), (func), (arg), &(region)->oldubf); \ - (th)->status = THREAD_STOPPED; \ - thread_debug("enter blocking region (%p)\n", (void *)(th)); \ - RB_GC_SAVE_MACHINE_CONTEXT(th); \ - native_mutex_unlock(&(th)->vm->global_vm_lock); \ - } while (0) static inline void blocking_region_end(rb_thread_t *th, struct rb_blocking_region_buffer *region) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/