From a3e1b1ce7ed7e7ffac23015fc2fde56511b30681 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 31 Dec 2006 15:02:22 +0000 Subject: * Merge YARV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_win32.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 thread_win32.h (limited to 'thread_win32.h') diff --git a/thread_win32.h b/thread_win32.h new file mode 100644 index 0000000000..8be59b0c1b --- /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 + +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 */ + -- cgit v1.2.1