Changeset 5171
- Timestamp:
- Feb 29, 2008, 1:58:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/platform.c
r5167 r5171 142 142 { 143 143 tr_thread * t = tr_new0( tr_thread, 1 ); 144 145 #ifdef __BEOS__146 t->thread = spawn_thread( (void*)ThreadFunc, name, B_NORMAL_PRIORITY, t );147 resume_thread( t->thread );148 #elif defined(WIN32)149 unsigned id;150 t->thread_handle = (HANDLE) _beginthreadex( NULL, 0, &ThreadFunc, t, 0, &id );151 t->thread = (DWORD) id;152 #else153 pthread_create( &t->thread, NULL, (void * (*) (void *)) ThreadFunc, t );154 #endif155 144 t->func = func; 156 145 t->arg = arg; 157 146 t->name = name; 147 148 #ifdef __BEOS__ 149 t->thread = spawn_thread( (void*)ThreadFunc, name, B_NORMAL_PRIORITY, t ); 150 resume_thread( t->thread ); 151 #elif defined(WIN32) 152 { 153 unsigned int id; 154 t->thread_handle = (HANDLE) _beginthreadex( NULL, 0, &ThreadFunc, t, 0, &id ); 155 t->thread = (DWORD) id; 156 } 157 #else 158 pthread_create( &t->thread, NULL, (void * (*) (void *)) ThreadFunc, t ); 159 #endif 158 160 159 161 return t;
Note: See TracChangeset
for help on using the changeset viewer.