XQuartz: Use a mutex to ensure we only have one thread calling mieqEnqueue at a time.

(cherry picked from commit 7b087c965bce9f440ab5233d6383aa4a7de969b8)
This commit is contained in:
Jeremy Huddleston 2008-04-17 15:23:00 -07:00
commit 2a1ba20af9
4 changed files with 149 additions and 103 deletions

View file

@ -36,6 +36,9 @@ extern pthread_t APPKIT_THREAD;
#define threadSafetyID(tid) (pthread_equal((tid), SERVER_THREAD) ? "X Server Thread" : "Appkit Thread")
/* Dump the call stack */
void spewCallStack(void);
/* Print message to ErrorF if we're in the wrong thread */
void _threadAssert(pthread_t tid, const char *file, const char *fun, int line);