Changeset 195 for trunk/src/corelib


Ignore:
Timestamp:
Sep 26, 2009, 2:34:55 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: Don't break waiting on sync primitives because of ERROR_INTERRUPT that we get as a result of handling Posix signals (SIGCHILD at the moment).

Location:
trunk/src/corelib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/global/qt_os2.h

    r100 r195  
    6969#endif
    7070
     71
     72
     73
     74
     75
     76
     77
    7178#endif // defined(Q_CC_GNU) && defined(__INNOTEK_LIBC__)
    7279
  • trunk/src/corelib/io/qprocess_os2.cpp

    r192 r195  
    332332    do {
    333333        locker.unlock();
    334         arc = DosWaitEventSem(eventSem, SEM_INDEFINITE_WAIT);
     334        );
    335335        locker.relock();
    336336        if (finish)
     
    941941                }
    942942            } else {
    943                 APIRET arc = DosWaitEventSem(waitSem, (ULONG)timeout);
     943                APIRET arc;
     944                qDosNI(arc = DosWaitEventSem(waitSem, (ULONG)timeout));
    944945                if (arc == ERROR_TIMEOUT) {
    945946                    timedOut = true;
     
    10351036                }
    10361037            } else {
    1037                 APIRET arc = DosWaitEventSem(waitSem, (ULONG)timeout);
     1038                APIRET arc;
     1039                qDosNI(arc = DosWaitEventSem(waitSem, (ULONG)timeout));
    10381040                if (arc == ERROR_TIMEOUT) {
    10391041                    timedOut = true;
     
    11321134                }
    11331135            } else {
    1134                 APIRET arc = DosWaitEventSem(waitSem, (ULONG)timeout);
     1136                APIRET arc;
     1137                qDosNI(arc = DosWaitEventSem(waitSem, (ULONG)timeout));
    11351138                if (arc == ERROR_TIMEOUT) {
    11361139                    timedOut = true;
  • trunk/src/corelib/thread/qmutex_os2.cpp

    r176 r195  
    6868bool QMutexPrivate::wait(int timeout)
    6969{
    70     APIRET rc = DosWaitEventSem(sem, timeout < 0 ? SEM_INDEFINITE_WAIT : timeout);
     70    APIRET rc;
     71    qDosNI(rc = DosWaitEventSem(sem, timeout < 0 ? SEM_INDEFINITE_WAIT : timeout));
    7172    switch (rc) {
    7273        case NO_ERROR:
  • trunk/src/corelib/thread/qthread_os2.cpp

    r81 r195  
    190190        for (int i = 0; i < qt_adopted_thread_tids.size();) {
    191191            tid = qt_adopted_thread_tids.at(i);
    192             rc = DosWaitThread(&tid, DCWW_NOWAIT);
     192            );
    193193            if (rc != ERROR_THREAD_NOT_TERMINATED) {
    194194                if (rc == NO_ERROR || rc == ERROR_INVALID_THREADID) {
     
    206206        qt_adopted_thread_watcher_mutex.unlock();
    207207
    208         rc = DosWaitEventSem(qt_adopted_thread_wakeup, 300);
     208        );
    209209        if (rc != NO_ERROR && rc != ERROR_TIMEOUT) {
    210210            qWarning("qt_adopted_thread_watcher_function: DosWaitEventSem returned %lu", rc);
     
    437437    APIRET rc = NO_ERROR;
    438438    if (time == ULONG_MAX) {
    439         rc = DosWaitThread(&tid, DCWW_WAIT);
     439        );
    440440    } else {
    441441        ULONG sleep;
     
    447447            sleep = time > THREAD_WAIT_INTERVAL ? THREAD_WAIT_INTERVAL : time;
    448448            DosSleep(sleep);
    449             rc = DosWaitThread(&tid, DCWW_NOWAIT);
     449            );
    450450            if (rc != ERROR_THREAD_NOT_TERMINATED)
    451451                break;
  • trunk/src/corelib/thread/qwaitcondition_os2.cpp

    r66 r195  
    118118    // wait for the event
    119119    bool ret = false;
    120     APIRET rc = DosWaitEventSem(wce->event, time);
     120    APIRET rc;
     121    qDosNI(rc = DosWaitEventSem(wce->event, time));
    121122    if (rc == NO_ERROR)
    122123        ret = true;
Note: See TracChangeset for help on using the changeset viewer.