mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
194a6a2c68
[ruby-core:88306] Revert "process.c: ensure th->interrupt lock is held when migrating" This reverts commit5ca416bdf6
(r64201) Revert "process.c (rb_waitpid): reduce sigwait_fd bouncing" This reverts commit217bdd776f
(r64200). Revert "test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts" This reverts commit9f395f1120
(r64199). Revert "thread_pthread.c (native_sleep): reduce ppoll sleeps" This reverts commitb3aa256c4d
(r64193). Revert "thread.c (consume_communication_pipe): do not retry after short read" This reverts commit291a82f748
(r64185). Revert "test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread" This reverts commit3dbd8d1f66
(r64184). Revert "thread_pthread.c (gvl_acquire_common): persist timeout across calls" This reverts commit8c2ae6e3ed
(r64165). Revert "test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout" This reverts commit931cda4db8
(r64135). Revert "thread_pthread.c (gvl_yield): do ubf wakeups when uncontended" This reverts commit508f00314f
(r64133). Revert "thread_pthread.h (native_thread_data): split condvars on some platforms" This reverts commita038bf238b
(r64124). Revert "process.c (waitpid_nogvl): prevent conflicting use of sleep_cond" This reverts commit7018acc946
(r64117). Revert "thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT" This reverts commit56491afc79
(r64116). Revert "thread*.c: waiting on sigwait_fd performs periodic ubf wakeups" This reverts commitab47a57a46
(r64115). Revert "thread_pthread.c (gvl_destroy): make no-op on GVL bits" This reverts commit95cae74817
(r64114). Revert "thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case" This reverts commit4514362948
(r64113). Revert "thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder" This reverts commit26b8a70bb3
(r64111). Revert "thread.c: move ppoll wrapper into thread_pthread.c" This reverts commit3dc7727d22
(r64110). Revert "thread.c: move ppoll wrapper before thread_pthread.c" This reverts commit2fa1e2e3c3
(r64109). Revert "thread_pthread.c (ubf_select): refix [Bug #5343]" This reverts commit4c1ab82f06
(r64108). Revert "thread_win32.c: suppress warnings by -Wsuggest-attribute" This reverts commit6a9b63e390
(r64159). Revert "thread_pthread: remove timer-thread by restructuring GVL" This reverts commit708bfd2115
(r64107). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
/**********************************************************************
|
|
|
|
thread_pthread.h -
|
|
|
|
$Author$
|
|
|
|
Copyright (C) 2004-2007 Koichi Sasada
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef RUBY_THREAD_PTHREAD_H
|
|
#define RUBY_THREAD_PTHREAD_H
|
|
|
|
#ifdef HAVE_PTHREAD_NP_H
|
|
#include <pthread_np.h>
|
|
#endif
|
|
|
|
#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
|
|
#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
|
|
|
|
typedef pthread_cond_t rb_nativethread_cond_t;
|
|
|
|
typedef struct native_thread_data_struct {
|
|
struct list_node ubf_list;
|
|
rb_nativethread_cond_t sleep_cond;
|
|
} native_thread_data_t;
|
|
|
|
#undef except
|
|
#undef try
|
|
#undef leave
|
|
#undef finally
|
|
|
|
typedef struct rb_global_vm_lock_struct {
|
|
/* fast path */
|
|
unsigned long acquired;
|
|
rb_nativethread_lock_t lock;
|
|
|
|
/* slow path */
|
|
volatile unsigned long waiting;
|
|
rb_nativethread_cond_t cond;
|
|
|
|
/* yield */
|
|
rb_nativethread_cond_t switch_cond;
|
|
rb_nativethread_cond_t switch_wait_cond;
|
|
int need_yield;
|
|
int wait_yield;
|
|
} rb_global_vm_lock_t;
|
|
|
|
#endif /* RUBY_THREAD_PTHREAD_H */
|