00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_WINDOWS_PLATFORMDEFS_H_
00019 #define _DECAF_INTERNAL_UTIL_CONCURRENT_WINDOWS_PLATFORMDEFS_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #if HAVE_SIGNAL_H
00024 #include <signal.h>
00025 #endif
00026 #if HAVE_STRING_H
00027 #include <string.h>
00028 #endif
00029 #if HAVE_SCHED_H
00030 #include <sched.h>
00031 #endif
00032 #if HAVE_SYS_TIME_H
00033 #include <sys/time.h>
00034 #endif
00035 #if HAVE_UNISTD_H
00036 #include <unistd.h>
00037 #endif
00038 #if HAVE_TIME_H
00039 #include <time.h>
00040 #endif
00041 #ifdef HAVE_PROCESS_H
00042 #include <process.h>
00043 #endif
00044
00045 namespace decaf{
00046 namespace internal{
00047 namespace util{
00048 namespace concurrent{
00049
00050 struct RWLOCK {
00051 HANDLE writeMutex;
00052 HANDLE readEvent;
00053 volatile LONG readers;
00054 };
00055
00056 typedef void* PLATFORM_THREAD_ENTRY_ARG;
00057
00058 #define PLATFORM_THREAD_RETURN() return 0;
00059 #define PLATFORM_THREAD_CALLBACK_TYPE unsigned
00060 #define PLATFORM_DEFAULT_STACK_SIZE 0x8000
00061 #define PLATFORM_CALLING_CONV __stdcall
00062
00063 typedef HANDLE decaf_thread_t;
00064 typedef DWORD decaf_tls_key;
00065 typedef HANDLE decaf_condition_t;
00066 typedef LPCRITICAL_SECTION decaf_mutex_t;
00067 typedef RWLOCK* decaf_rwmutex_t;
00068
00069 }}}}
00070
00071 #endif