diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-31 15:02:22 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-12-31 15:02:22 +0000 |
commit | 4ef881bd15c9c4e2e9b20da2c091e80d4d530119 (patch) | |
tree | 7b725552a9a4ded93849ca2faab1b257f7761790 /thread_win32.h | |
parent | 182520b0acc5eea4da52bc8734dc5e3280ce5f94 (diff) | |
download | ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.tar.gz ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.tar.xz ruby-4ef881bd15c9c4e2e9b20da2c091e80d4d530119.zip |
* Merge YARV
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.h')
-rw-r--r-- | thread_win32.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/thread_win32.h b/thread_win32.h new file mode 100644 index 000000000..8be59b0c1 --- /dev/null +++ b/thread_win32.h @@ -0,0 +1,34 @@ +/********************************************************************** + + thread_win32.h - + + $Author$ + $Date$ + + Copyright (C) 2004-2006 Koichi Sasada + +**********************************************************************/ + +/* interface */ +#ifndef THREAD_WIN32_H_INCLUDED +#define THREAD_WIN32_H_INCLUDED + +#include <windows.h> + +WINBASEAPI BOOL WINAPI +TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection); + +typedef HANDLE yarv_thread_id_t; +typedef CRITICAL_SECTION yarv_thread_lock_t; + +int native_mutex_lock(yarv_thread_lock_t *); +int native_mutex_unlock(yarv_thread_lock_t *); +int native_mutex_trylock(yarv_thread_lock_t *); +void native_mutex_initialize(yarv_thread_lock_t *); + +typedef struct native_thread_data_struct { + HANDLE interrupt_event; +} native_thread_data_t; + +#endif /* THREAD_WIN32_H_INCLUDED */ + |