Commit e63f4abf authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

Add missing casts related to pthread_t. Tweak comments.

parent 8e8518d4
...@@ -127,7 +127,8 @@ int pthread_create(pthread_t* thread, const pthread_attr_t* attr, void* ...@@ -127,7 +127,8 @@ int pthread_create(pthread_t* thread, const pthread_attr_t* attr, void*
idata->start_routine = start_routine; idata->start_routine = start_routine;
idata->arg = arg; idata->arg = arg;
hThread = CreateThread(NULL, 0, pthread_thread_start, idata, 0, thread); hThread = CreateThread( NULL, 0, pthread_thread_start, idata, 0,
(LPDWORD)thread);
if(hThread) if(hThread)
CloseHandle(hThread); CloseHandle(hThread);
...@@ -142,7 +143,7 @@ int pthread_create(pthread_t* thread, const pthread_attr_t* attr, void* ...@@ -142,7 +143,7 @@ int pthread_create(pthread_t* thread, const pthread_attr_t* attr, void*
int pthread_cancel(pthread_t thread) int pthread_cancel(pthread_t thread)
{ {
HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, thread); HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, (DWORD)thread);
if(!TerminateThread(hThread, 0)) if(!TerminateThread(hThread, 0))
{ {
...@@ -157,7 +158,7 @@ int pthread_cancel(pthread_t thread) ...@@ -157,7 +158,7 @@ int pthread_cancel(pthread_t thread)
int pthread_join(pthread_t thread, void **value_ptr) int pthread_join(pthread_t thread, void **value_ptr)
{ {
HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, thread); HANDLE hThread = OpenThread(THREAD_ALL_ACCESS, FALSE, (DWORD)thread);
WaitForSingleObject(hThread, INFINITE); WaitForSingleObject(hThread, INFINITE);
if(!GetExitCodeThread(hThread, (LPDWORD)value_ptr)) if(!GetExitCodeThread(hThread, (LPDWORD)value_ptr))
...@@ -660,10 +661,10 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) ...@@ -660,10 +661,10 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
return libc_sigaction(signum, act, oldact); return libc_sigaction(signum, act, oldact);
} }
#else /* __GLIBC__ */ #else /* __GLIBC__ || __FREEBSD__ */
void PTHREAD_init_done(void) void PTHREAD_init_done(void)
{ {
} }
#endif /* __GLIBC__ */ #endif /* __GLIBC__ || __FREEBSD__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment