Changeset 176


Ignore:
Timestamp:
Sep 10, 2009, 2:36:43 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: Found that DCE_POSTONE is required in DosCreateEventSem() in QMutexPrivate to really have the "wake one" semantics. Several threads waiting for a mutex could otherwise be simultaneously woken up on mutex release resulting into simultaneous access to the exclusive resurce (whith the assertion at #374 of qmutex.cpp being the most harmless consequence).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/thread/qmutex_os2.cpp

    r82 r176  
    5151    : recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0)
    5252{
    53     APIRET rc = DosCreateEventSem(NULL, &sem, DCE_AUTORESET, FALSE);
     53    APIRET rc = DosCreateEventSem(NULL, &sem, DCE_AUTORESET, FALSE);
    5454    if (rc != NO_ERROR) {
    5555        sem = NULLHANDLE;
Note: See TracChangeset for help on using the changeset viewer.