diff options
author | larryh%netscape.com <devnull@localhost> | 1999-06-14 18:07:59 +0000 |
---|---|---|
committer | larryh%netscape.com <devnull@localhost> | 1999-06-14 18:07:59 +0000 |
commit | b427c54c56e1e49bbd5b06e0cb514f8f1fce78e5 (patch) | |
tree | f3669b4d6a4afc94744d1850a8a16d87aaa469c5 | |
parent | b4db76e082fee25f6595f15069cee222b52ddb14 (diff) | |
download | nspr-hg-b427c54c56e1e49bbd5b06e0cb514f8f1fce78e5.tar.gz |
BugZilla #8018sspitzer-news-tagTREEWIDGET_19990616_BASESeaMonkey_M7_BASESeaMonkey_M7_19990619_BASERDF_19990617_BASE
-rw-r--r-- | lib/ds/plevent.c | 9 | ||||
-rw-r--r-- | lib/ds/plevent.h | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/ds/plevent.c b/lib/ds/plevent.c index 5ac6aaf5..9456d0ca 100644 --- a/lib/ds/plevent.c +++ b/lib/ds/plevent.c @@ -796,6 +796,15 @@ PL_GetEventQueueSelectFD(PLEventQueue* self) #endif } +PR_IMPLEMENT(PRBool) +PL_IsQueueOnCurrentThread( PLEventQueue *queue ) +{ + PRThread *me = PR_GetCurrentThread(); + if ( me == queue->handlerThread ) + return PR_TRUE; + else + return PR_FALSE; +} /* end PL_IsQueueOnCurrentThread() */ #if defined(WIN16) || defined(_WIN32) /* diff --git a/lib/ds/plevent.h b/lib/ds/plevent.h index 5df53dc7..035f3827 100644 --- a/lib/ds/plevent.h +++ b/lib/ds/plevent.h @@ -384,6 +384,14 @@ PL_EventLoop(PLEventQueue* self); PR_EXTERN(PRInt32) PL_GetEventQueueSelectFD(PLEventQueue* self); +/* +** This routine will allow you to check to see if the given eventQueue in +** on the current thread. It will return PR_TRUE if so, else it will return +** PR_FALSE +*/ +PR_EXTERN(PRBool) + PL_IsQueueOnCurrentThread( PLEventQueue *queue ); + /******************************************************************************* * Event Operations ******************************************************************************/ |