![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 #ifndef __RAK_THREAD_H 00002 #define __RAK_THREAD_H 00003 00004 #if defined(_WIN32_WCE) 00005 #include "WindowsIncludes.h" 00006 #endif 00007 00008 #include "Export.h" 00009 00010 00011 00012 00013 00014 00015 namespace RakNet 00016 { 00017 00019 #if defined(_WIN32_WCE) 00020 #define RAK_THREAD_DECLARATION(functionName) DWORD WINAPI functionName(LPVOID arguments) 00021 00022 00023 #elif defined(_WIN32) 00024 #define RAK_THREAD_DECLARATION(functionName) unsigned __stdcall functionName( void* arguments ) 00025 00026 00027 #else 00028 #define RAK_THREAD_DECLARATION(functionName) void* functionName( void* arguments ) 00029 #endif 00030 00031 class RAK_DLL_EXPORT RakThread 00032 { 00033 public: 00034 00035 00036 00037 00043 00044 /* 00045 nice value Win32 Priority 00046 -20 to -16 THREAD_PRIORITY_HIGHEST 00047 -15 to -6 THREAD_PRIORITY_ABOVE_NORMAL 00048 -5 to +4 THREAD_PRIORITY_NORMAL 00049 +5 to +14 THREAD_PRIORITY_BELOW_NORMAL 00050 +15 to +19 THREAD_PRIORITY_LOWEST 00051 */ 00052 #if defined(_WIN32_WCE) 00053 static int Create( LPTHREAD_START_ROUTINE start_address, void *arglist, int priority=0); 00054 00055 00056 #elif defined(_WIN32) 00057 static int Create( unsigned __stdcall start_address( void* ), void *arglist, int priority=0); 00058 00059 00060 #else 00061 static int Create( void* start_address( void* ), void *arglist, int priority=0); 00062 #endif 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 }; 00080 00081 } 00082 00083 #endif
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.