mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_core.h: move the definition of struct rb_mutex_struct.
* thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
13e0d5bc91
commit
8d56defa55
3 changed files with 14 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Jul 28 20:17:03 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* vm_core.h: move the definition of struct rb_mutex_struct.
|
||||||
|
|
||||||
|
* thread.c: ditto.
|
||||||
|
|
||||||
Mon Jul 28 18:58:46 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Mon Jul 28 18:58:46 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* thread.c (mutex_unlock): fix typo.
|
* thread.c (mutex_unlock): fix typo.
|
||||||
|
|
9
thread.c
9
thread.c
|
@ -62,7 +62,14 @@ static double timeofday(void);
|
||||||
struct timeval rb_time_interval(VALUE);
|
struct timeval rb_time_interval(VALUE);
|
||||||
static int rb_thread_dead(rb_thread_t *th);
|
static int rb_thread_dead(rb_thread_t *th);
|
||||||
|
|
||||||
typedef struct rb_mutex_struct mutex_t;
|
typedef struct rb_mutex_struct
|
||||||
|
{
|
||||||
|
rb_thread_lock_t lock;
|
||||||
|
rb_thread_cond_t cond;
|
||||||
|
struct rb_thread_struct volatile *th;
|
||||||
|
volatile int cond_waiting, cond_notified;
|
||||||
|
struct rb_mutex_struct *next_mutex;
|
||||||
|
} mutex_t;
|
||||||
|
|
||||||
static void rb_mutex_unlock_all(mutex_t *mutex);
|
static void rb_mutex_unlock_all(mutex_t *mutex);
|
||||||
static void rb_check_deadlock(rb_vm_t *vm);
|
static void rb_check_deadlock(rb_vm_t *vm);
|
||||||
|
|
|
@ -498,15 +498,6 @@ struct rb_thread_struct
|
||||||
int abort_on_exception;
|
int abort_on_exception;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rb_mutex_struct
|
|
||||||
{
|
|
||||||
rb_thread_lock_t lock;
|
|
||||||
rb_thread_cond_t cond;
|
|
||||||
struct rb_thread_struct volatile *th;
|
|
||||||
volatile int cond_waiting, cond_notified;
|
|
||||||
struct rb_mutex_struct *next_mutex;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* iseq.c */
|
/* iseq.c */
|
||||||
VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE);
|
VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE);
|
||||||
VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE);
|
VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue