PR_CEnterMonitor(event);  #ifdef PL_POST_TIMINGS event->postTime = PR_IntervalNow(); #endif
PR_Lock(event->lock);
PL_PostSynchronousEvent(PLEventQueue* self, PLEvent* event){    void* result;    if (self == NULL)    return NULL;    PR_ASSERT(event != NULL);    PR_CEnterMonitor(event);#ifdef PL_POST_TIMINGS    event->postTime = PR_IntervalNow();#endif    if (PR_CurrentThread() == self->handlerThread) {	/* Handle the case where the thread requesting the event handling	   is also the thread that's supposed to do the handling. */	result = event->handler(event);    }    else {	int i, entryCount = PR_GetMonitorEntryCount(self->monitor);	event->synchronousResult = (void*)PR_TRUE;	PL_PostEvent(self, event);	/* We need to temporarily give up our event queue monitor if	   we're holding it, otherwise, the thread we're going to wait	   for notification from won't be able to enter it to process	   the event. */	if (entryCount) {	    for (i = 0; i < entryCount; i++)		PR_ExitMonitor(self->monitor);	}	PR_CWait(event, PR_INTERVAL_NO_TIMEOUT);	/* wait for event to be handled or destroyed */	if (entryCount) {	    for (i = 0; i < entryCount; i++)		PR_EnterMonitor(self->monitor);	}    	result = event->synchronousResult;	event->synchronousResult = NULL;    }    PR_CExitMonitor(event);    /* For synchronous events, they're destroyed here on the caller's       thread before the result is returned. See PL_HandleEvent. */    PL_DestroyEvent(event);    return result;}