From 640de17a1d88700c8d89f3a774c4a07d0e3eddc0 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 19 Nov 2004 00:51:25 +0000
Subject: [PATCH] Use POSIX thread ID function (pthread_self) since we're using
 pthread_t in msg_queue_t.

---
 src/xpdev/msg_queue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xpdev/msg_queue.c b/src/xpdev/msg_queue.c
index 546704e6c0..04db58f12a 100644
--- a/src/xpdev/msg_queue.c
+++ b/src/xpdev/msg_queue.c
@@ -39,7 +39,7 @@
 #include <string.h>		/* memset */
 
 #include "genwrap.h"	/* msclock() */
-#include "threadwrap.h"	/* GetCurrentThreadId */
+#include "threadwrap.h"	/* pthread_self */
 #include "msg_queue.h"
 
 msg_queue_t* msgQueueInit(msg_queue_t* q, long flags)
@@ -54,7 +54,7 @@ msg_queue_t* msgQueueInit(msg_queue_t* q, long flags)
 
 	q->flags = flags;
 	q->refs = 1;
-	q->owner_thread_id = GetCurrentThreadId();
+	q->owner_thread_id = pthread_self();
 
 	if(q->flags&MSG_QUEUE_BIDIR)
 		listInit(&q->in,LINK_LIST_SEMAPHORE);
@@ -125,7 +125,7 @@ static link_list_t* msgQueueReadList(msg_queue_t* q)
 		return(NULL);
 
 	if((q->flags&MSG_QUEUE_BIDIR)
-		&& q->owner_thread_id == GetCurrentThreadId())
+		&& q->owner_thread_id == pthread_self())
 		return(&q->in);
 	return(&q->out);
 }
@@ -136,7 +136,7 @@ static link_list_t* msgQueueWriteList(msg_queue_t* q)
 		return(NULL);
 
 	if(!(q->flags&MSG_QUEUE_BIDIR)
-		|| q->owner_thread_id == GetCurrentThreadId())
+		|| q->owner_thread_id == pthread_self())
 		return(&q->out);
 	return(&q->in);
 }
-- 
GitLab