VirtualBox

Changeset 26449 in vbox


Ignore:
Timestamp:
Feb 11, 2010 6:05:26 PM (15 years ago)
Author:
vboxsync
Message:

xpcom/plevent.c: Fixed state inconsistency between PendingEvents/PL_EventAvailable and PL_GetEventQueueSelectFD. When there are more pending events after PL_ProcessPendingEvents has taken care of the batch it is going process in that call, it will call _pl_NativeNotify() to reassert the pending condition on the native queues. This is the right thing to do for most native queues, but not for pipes because that will leave two bytes in the pipe and _pl_AcknowledgeNativeNotify only reads one. So, I've changed _pl_NativeNotify() to not write to the pipe until after _pl_AcknowledgeNativeNotify has been invoked.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/threads/plevent.c

    r23073 r26449  
    12161216    unsigned char buf[] = { NOTIFY_TOKEN };
    12171217
     1218# ifdef VBOX
     1219    /* Don't write two chars, because we'll only acknowledge one and that'll
     1220       cause trouble for anyone selecting/polling on the read descriptor. */
     1221    if (self->notified)
     1222        return PR_SUCCESS;
     1223# endif
     1224
    12181225    PR_LOG(event_lm, PR_LOG_DEBUG,
    12191226           ("_pl_NativeNotify: self=%p",
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette