| 55 | } |
| 56 | |
| 57 | ThreadHandle CreateThread( const char * name, DaedThread function, void * argument ) |
| 58 | { |
| 59 | DWORD id; |
| 60 | SDaedThreadDetails * thread_details( new SDaedThreadDetails( function, argument ) ); |
| 61 | HANDLE h( ::CreateThread( NULL, 0, StartThreadFunc, thread_details, CREATE_SUSPENDED, &id ) ); |
| 62 | |
| 63 | if(h != NULL) |
| 64 | { |
| 65 | ResumeThread( h ); |
| 66 | return reinterpret_cast< s32 >( h ); |
| 67 | } |
| 68 | |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | void SetThreadPriority( ThreadHandle handle, EThreadPriority pri ) |
| 73 | { |