* 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
This commit is contained in:
usa 2008-07-28 12:27:43 +00:00
Родитель 517fd61e14
Коммит a73ba1def7
4 изменённых файлов: 34 добавлений и 25 удалений

Просмотреть файл

@ -1,3 +1,11 @@
Mon Jul 28 21:24:33 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* 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.
Mon Jul 28 21:00:10 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_require.rb (test_require_too_long_filename):
@ -34,9 +42,9 @@ Mon Jul 28 16:06:36 2008 NAKAMURA Usaku <usa@ruby-lang.org>
Mon Jul 28 16:01:12 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_win32.[ch]: moved definitions of cond_every_entry and
rb_thread_cond_struct from .c to .h because rb_thread_cond_struct
is used in vm_core.h.
* thread_win32.[ch] (cond_every_entry, rb_thread_cond_struct): moved
the definitions from .c to .h because rb_thread_cond_struct is used
in vm_core.h.
Mon Jul 28 14:29:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
@ -1913,8 +1921,8 @@ Fri Jun 20 03:26:00 2008 NAKAMURA Usaku <usa@ruby-lang.org>
Fri Jun 20 03:19:39 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/testunit/collector/test_dir.rb: r15825 made it unnecessary to change
String to Symbol.
* test/testunit/collector/test_dir.rb: r15825 made it unnecessary to
change String to Symbol.
* test/testunit/collector/test_objectspace.rb: ditto.

Просмотреть файл

@ -62,16 +62,6 @@ static double timeofday(void);
struct timeval rb_time_interval(VALUE);
static int rb_thread_dead(rb_thread_t *th);
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_check_deadlock(rb_vm_t *vm);
void rb_signal_exec(rb_thread_t *th, int sig);
@ -284,6 +274,17 @@ terminate_i(st_data_t key, st_data_t val, rb_thread_t *main_thread)
return ST_CONTINUE;
}
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);
void
rb_thread_terminate_all(void)
{

Просмотреть файл

@ -333,6 +333,16 @@ native_mutex_destroy(rb_thread_lock_t *lock)
#endif
}
struct cond_event_entry {
struct cond_event_entry* next;
HANDLE event;
};
struct rb_thread_cond_struct {
struct cond_event_entry *next;
struct cond_event_entry *last;
};
static void
native_cond_signal(rb_thread_cond_t *cond)
{

Просмотреть файл

@ -25,16 +25,6 @@ typedef HANDLE rb_thread_id_t;
typedef CRITICAL_SECTION rb_thread_lock_t;
typedef struct rb_thread_cond_struct rb_thread_cond_t;
struct cond_event_entry {
struct cond_event_entry* next;
HANDLE event;
};
struct rb_thread_cond_struct {
struct cond_event_entry *next;
struct cond_event_entry *last;
};
typedef struct native_thread_data_struct {
HANDLE interrupt_event;
} native_thread_data_t;