summaryrefslogtreecommitdiff
path: root/pthread_kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_kill.c')
-rw-r--r--pthread_kill.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pthread_kill.c b/pthread_kill.c
index c40235c..4cb62c1 100644
--- a/pthread_kill.c
+++ b/pthread_kill.c
@@ -74,12 +74,16 @@ pthread_kill (pthread_t thread, int sig)
*/
{
int result = 0;
+ ptw32_thread_t * tp;
EnterCriticalSection (&ptw32_thread_reuse_lock);
- if (NULL == thread
- || NULL == thread->threadH
- || THREAD_PRIORITY_ERROR_RETURN == GetThreadPriority (thread->threadH))
+ tp = (ptw32_thread_t *) thread.p;
+
+ if (NULL == tp
+ || thread.x != tp->ptHandle.x
+ || NULL == tp->threadH
+ || THREAD_PRIORITY_ERROR_RETURN == GetThreadPriority (tp->threadH))
{
result = ESRCH;
}