Commit graph

194 commits

Author SHA1 Message Date
yugui
3c000eab7c merges r21659 from trunk into ruby_1_9_1.
* vm.c: add a prefix "rb_" to exposed functions
  vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(),
  vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(),
  vm_get_sourceline(), vm_cref(), vm_localjump_error(),
  vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump().
  This changes may affect only core because most of renamed functions
  require a pointer of not-exposed struct such as rb_thread_t or NODE.
  In short, they are core functions.
* cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c,
  vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c:
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 11:09:42 +00:00
yugui
681a27d1f3 merges r21725 from trunk into ruby_1_9_1.
* thread.c (rb_time_timeval): made a real prototype.  a patch from
  Marcus Rueckert <darix AT opensu.se> at [ruby-core:21492].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 09:21:00 +00:00
yugui
bf598cb664 merges r21662 from trunk into ruby_1_9_1.
* thread.c (rb_thread_execute_interrupts): needs
  rb_signal_buff_size to be declared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 09:53:14 +00:00
yugui
8801fecb82 merges r21592 from trunk into ruby_1_9_1.
* thread.c (thread_start_func_2): call ruby_cleanup() if thread is
  main thread.  [ruby-dev:37624]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 04:07:31 +00:00
yugui
566072ec8d merges r21582 from trunk into ruby_1_9_1.
* thread.c (rb_thread_execute_interrupts): if signal is already
  buffered, main thread should wait until timer thread delivers it.

* thread.c (timer_thread_function): should defer delivery of a signal
  if main thread does not yet trap a previous one.  [ruby-dev:37676]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 04:07:04 +00:00
yugui
36c95beb5a merges r21578 from trunk into ruby_1_9_1.
* thread.c (call_trace_proc): as Matz said ([ruby-core:21183]),
  should skip rb_str_new2() if rb_sourcefile() returns NULL.
  rb_sourcefile() returns NULL if frame is toplevel of Fiber.
  [ruby-core:21161] [Bug #985]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 04:06:54 +00:00
yugui
6227816910 merges r21487 from trunk into ruby_1_9_1.
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
	  rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
	  rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
	  functions, and macros for Windows.

	* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
	  fd_array if needed.  [ruby-core:19946]

	* win32/win32.c (copy_fd): new funcion for rb_w32_select().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 15:37:20 +00:00
yugui
171ed51006 merges r21438 from trunk into ruby_1_9_1.
* thread.c: fix comment (terminology: Global VM Lock).
* thread.c (blocking_region_begin, blocking_region_end):
  save and clear th->blocking_region_buffer.
* thread.c (rb_thread_call_with_gvl): check if it has GVL.
* thread.c (ruby_thread_has_gvl_p): added.
* vm_core.h: add decls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 13:32:50 +00:00
yugui
dc60d183e6 merges r21338 from trunk into ruby_1_9_1.
* rdoc update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 02:18:13 +00:00
yugui
a2ba4372c6 merges r21185 from trunk into ruby_1_9_1.
* thread.c (rb_thread_blocking_region): add a comment.
* thread.c (rb_thread_call_without_gvl): added as a alias of
  rb_thread_blocking_region().
* thread.c (rb_thread_call_with_gvl): added.
* vm_core.h (rb_thread_t#blocking_region_buffer): added for
  rb_thread_call_with_gvl().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-30 11:04:44 +00:00
yugui
a25b3c05e7 merges r21148 from trunk into ruby_1_9_1.
* thread.c (rb_mutex_trylock): return false if Mutex owned
  by current thread.  [ruby-core:20943]
* thread.c (rb_mutex_lock): check dead lock (recursive lock) here.
* test/ruby/test_thread.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 07:19:32 +00:00
yugui
524ec326e2 merges r21105 and r21106 from trunk into ruby_1_9_1.
* thread.c (mutex_free): GC thread (main thread) has failed to unlock
  a mutex that is locked by another thread, which makes the mutex
  dangling in keeping_mutexes and causes [BUG] or stuck finally.
  Now unlocking is performed as locking thread.

* thread.c (mutex_unlock, rb_mutex_unlock, rb_mutex_unlock_all):
  mutex_unlock receives a thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 09:43:02 +00:00
yugui
a929fd040a merges r21097 from trunk into ruby_1_9_1.
* process.c (after_exec): needs to reset before restart timer
  thread.

* thread.c (thread_start_func_2): stops timer thread if forked in
  the new thread.   [ruby-core:19385]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 09:42:01 +00:00
yugui
6a0e4079f3 merges r21096 from trunk into ruby_1_9_1.
* thread.c (rb_thread_atfork, rb_thread_atfork_before_exec): DRY.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 09:41:53 +00:00
yugui
3b239725a0 merges r20976 from trunk into ruby_1_9_1.
* thread.c (thread_start_func_2): sets native thread key.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 09:56:30 +00:00
yugui
9b425aed7a merges r20917 from trunk into ruby_1_9_1.
rdoc update.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 09:52:07 +00:00
yugui
7adae93c68 * thread.c (Thread#set_trace_func, #add_trace_func): removed.
This is an unsupported feature in 1.9.1 and will be supported 
  in 1.9.2. [ruby-core:19581]
  (thread_add_trace_func): removes unnecessary function.
  (thread_add_trace_func_m): ditto.
  (thread_set_trace_func_m): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 02:17:00 +00:00
yugui
83c228fd84 merges r20766 from trunk into ruby_1_9_1.
* thread.c (sleep_timeval): cast tv_usec to long to shut up
  warnings on OSX.  [ruby-dev:37449]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:16:55 +00:00
yugui
f96cd536ee merges r20615 from trunk into ruby_1_9_1.
* thread.c (rb_mutex_unlock): shut up warning.  a patch from
  Kazuhiro NISHIYAMA in [ruby-dev:37345]. fix #846

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 01:02:04 +00:00
yugui
2e52bda3c8 merges r20593 from trunk into ruby_1_9_1.
* compile.c (iseq_compile_each), gc.c (assign_heap_slot),
  (gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add),
  proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all),
  (thread_start_func_2, blocking_region_begin, blocking_region_end),
  (rb_thread_kill), thread_pthread.c (native_thread_create),
  (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c
  (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state),
  (vm_call0): use void pointer for %p.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 01:01:02 +00:00
yugui
3567a062c8 merges r20444 and r20447 from trunk into ruby_1_9_1.
add comment for select behavior on file descriptors over FD_SETSIZE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 05:19:30 +00:00
yugui
c16831bff7 merges r20372-r20375 and r20380 from trunk into ruby_1_9_1.
* signal.c (register_sigaltstack): minimum size is insufficient for
  method calls.

* signal.c (sigsegv): handles stack overflow if possible.

* thread.c (ruby_thread_stack_overflow): helper function to raise
  sysstack_error.

* thread_pthread.c (ruby_stack_overflowed_p): checks for stack
  overflow.

* signal.c (ruby_sigaction_t): added.

* signal.c (register_sigaltstack): stores alt stack for debug
  purpose.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30 09:24:41 +00:00
yugui
2015069a20 * thread.c, thread_pthread.c, thread_win32.c: merges nobu's commits -
r20117, r20123, r20124, r20127, r20132-r20134, r20138, r20140, r20141
  and r20160 - from trunk into ruby_1_9_1.

* thread_pthread.c (thread_timer): checks working flags again.

* thread_pthread.c (rb_thread_create_timer_thread): do not wait never
  coming signal if failed to create tiemr thread.

* thread_pthread.c (native_cond_timedwait): returns error code.

* thread_pthread.c (thread_timer, rb_thread_create_timer_thread):
  handshakes properly.

* thread_pthread.c (thread_timer): initializes mutex each time.

* thread_win32.c (thread_start_func_1): use already gotten stack info.

* thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT
  when timed out.

* thread_pthread.c (thread_timer): uses pthread_cond_timedwait always
  instead of pthread_kill.

* thread.c (thread_timer): uses timedwait on cygwin.

* thread.c (rb_thread_stop_timer_thread): terminates timer thread
  immediately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30 09:22:31 +00:00
yugui
d22b7e6ddb merges r20346 from trunk into ruby_1_9_1.
* process.c (rb_fork): stops the timer thread during fork.
  [ruby-dev:37117]

* thread.c (rb_thread_start_timer_thread): timer thread needs
  system_working to be set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30 09:22:21 +00:00
yugui
486f93b789 merges r20229 and r20230 from trunk into ruby_1_9_1.
* thread.c (rb_barrier_{new,wait,release,destroy}): use Mutex so that
  circular requires fail with deadlock.  [ruby-core:19821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 16:47:24 +00:00
yugui
5cf6cefc04 merges r20223 from trunk into ruby_1_9_1.
* load.c (rb_require_safe): destroys barrier after successfully
  loaded, to get rid of loading same library again.  [ruby-core:19798]

* thread.c (rb_barrier_wait): can not wait destroyed barrier.

* thread.c (rb_barrier_destroy): destroys barrier so that no longer
  waited.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 16:46:39 +00:00
yugui
15c15c06c1 merges r20102 from trunk into ruby_1_9_1.
* include/ruby/intern.h (rb_mutex_synchronize): fixed prototype.

* thread.c (rb_mutex_synchronize): fixed function name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-04 13:37:10 +00:00
nobu
860fad971d * thread.c (blocking_region_{begin,end}): declared as inline.
* util.c (freedtoa): used only when MULTIPLE_THREADS is not defined.

* win32/win32.c (rb_w32_pipe): serial is DWORD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:01:23 +00:00
matz
22c8e88b41 * thread.c (rb_thread_wait_fd_rw): should not block by select if
there's only one thread living.  fixed [ruby-dev:36646].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-08 23:49:22 +00:00
nobu
f8718692a2 * thread.c (thlist_signal): clears the woken thread if nothing woke.
* thread.c (rb_barrier_wait): achieves the lock if no thread was
  waiting yet.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 08:02:07 +00:00
nobu
18684d9f7c * include/rubysig.h: old macros for backward compatibility.
* thread.c (BLOCKING_REGION): rewritten using helper functions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 00:47:18 +00:00
ko1
c431879a68 * thread.c (rb_thread_blocking_region): fix typo in a document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 08:58:13 +00:00
ko1
64c35be42c * thread.c (rb_thread_blocking_region): write a document
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 08:51:33 +00:00
ko1
b9a12116fb * thread.c, include/ruby/intern.h (rb_thread_interrupted): added.
* io.c: use VALUE of thead instead of rb_tread_t to check interrupts.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 08:17:17 +00:00
ko1
8cd252ac6f * common.mk: clean up
- remove blockinlining.$(OBJEXT) to built
  - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h)
  - make VM_CORE_H_INCLUDES variable (vm_core.h)
  - simplify rules.
  - make depends rule to output depend status using gcc -MM.
* include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h.
* include/ruby.h: ditto.
* load.c: add inclusion explicitly.
* enumerator.c, object.c, parse.y, thread.c, vm_dump.c:
  remove useless inclusion.
* eval_intern.h: cleanup inclusion.
* vm_core.h: rb_thread_t should be defined in this file.
* vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c.
* vm.h, vm_exec.h: rename vm.h to vm_exec.h.
* insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h.
* vm.c, vm_insnhelper.c, vm_insnhelper.h:
  - rename vm_eval() to vm_exec_core().
  - rename vm_eval_body() to vm_exec().
  - cleanup include order.
* vm_method.c: fix comment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 00:20:28 +00:00
ko1
f0bf74a07b * iseq.c (iseq_data_to_ary): make it static.
* thread.c (thgroup_enclose): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 18:23:27 +00:00
ko1
ca253f40db * thread.c (rb_thread_critical): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 17:41:40 +00:00
ko1
80843ea156 * thread.c (rb_thread_check_trap_pending): added for compatibility.
* ext/tk/tcltklib.c, ext/tk/tkutil/tkutil.c: remove ruby/signal.h
  dependency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 12:00:24 +00:00
nobu
c5bf9ceef6 * vm_core.h (struct rb_vm_struct): replaced signal staff with trap
staff.

* signal.c (signal_buff): per process resouce now.

* signal.c (trap_list): moved to VM.

* signal.c (rb_get_next_signal): reverted.

* signal.c (rb_trap_exit): trap_pending_list was no longer used.

* thread.c (timer_thread_function): delivers buffered per-process
  signals to each VMs.

* vm.c (rb_vm_mark): marks trap_list.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 04:22:04 +00:00
akr
94f421c9c0 fix a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 08:18:11 +00:00
ko1
ca6a8b1e2c * include/ruby/intern.h: rename RB_UBF_DFL to
RUBY_UBF_IO and RUBY_UBF_PROCESS.
  Because there is no default (universal) unblocking function.
* ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 07:44:24 +00:00
nobu
5f9c188d97 * include/ruby/ruby.h (rb_intern_const): tiny optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16 00:20:31 +00:00
nobu
914969a040 * thread.c (rb_thread_priority_set): get rid of C99 feature.
* transcode.c (transcode_search_path): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14 05:56:51 +00:00
ko1
abfd87c230 * thread.c (rb_thread_execute_interrupts): switch event
should be occur only once.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 21:26:49 +00:00
ko1
8f1e7a37e5 * thread.c (rb_thread_check_ints): added. please note that
this function may cause ruby's thread switching.
* include/ruby/intern.h: ditto.
* regint.h: use rb_thread_check_ints() instead of
  RUBY_CHECK_INTS() directly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 08:21:24 +00:00
ko1
16612b360b * thread.c, vm_core.h: add manual priority support
using time slice.  if you enable USE_NATIVE_THREAD_PRIORITY
  macro, this mechanism is ignored.  [ruby-dev:33124]
* thread_pthread.c, thread_win32.c: ditto.
* test/ruby/test_thread.rb: fix test parameter.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 07:53:35 +00:00
nobu
3af2559d17 * thread.c (thread_start_func_2): propagates fatal error and system
exit to the main thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 21:55:23 +00:00
nobu
ea79b2360a * thread.c (rb_mutex_unlock_all): mutex is no longer a ruby object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 16:25:46 +00:00
nobu
807fcf9d13 * win32/win32.c (rb_w32_select): recalc the rest of timeout for each
iterations.  [ruby-core:18015]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 08:48:31 +00:00
usa
a73ba1def7 * thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): reverted
r18239 because r18245 made the changes unnecessary.

	* thread.c (rb_mutex_struct): define after including thread_{pthread,
	  win32}.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-28 12:27:43 +00:00