Ignore:
Timestamp:
Mar 30, 2001, 10:27:12 PM (24 years ago)
Author:
umoeller
Message:

misc. changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/threads.c

    r49 r52  
    9393                                &G_hmtxThreadInfos,
    9494                                0,        // unshared
    95                                 TRUE);        // request!
     95                                TRUE);    // request!
    9696        lstInit(&G_llThreadInfos, FALSE);
    9797    }
    9898    else
    99     {
    10099        arc = DosRequestMutexSem(G_hmtxThreadInfos,
    101100                                 SEM_INDEFINITE_WAIT);
    102     }
    103101
    104102    return (arc == NO_ERROR);
     
    138136        if (pti->flFlags & THRF_WAIT)
    139137            // "Wait" flag set: thrCreate is then
    140             // waiting on the wait event sem posted
    141                     // do not post if THRF_WAIT_EXPLICIT!
     138            // waiting on the wait event sem posted...
     139            // note: we do not post if THRF_WAIT_EXPLICIT!
     140            // thread must then post itself
    142141            DosPostEventSem(pti->hevRunning);
    143142
     
    160159        else
    161160            // no msgqueue:
     161            // run thread func without msg queue
    162162            ((PTHREADFUNC)pti->pThreadFunc)(pti);
    163163
     
    174174        }
    175175
     176        // for non-transient threads: set exit flags
     177        // V0.9.7 (2000-12-20) [umoeller]
     178        pti->fExitComplete = TRUE;
     179        pti->tid = NULLHANDLE;
     180
     181        if (pti->pfRunning)
     182            // clear "running" flag
     183            *(pti->pfRunning) = FALSE;
     184
    176185        // (2000-12-18) [lafaix] clean up pti if thread is transient.
    177186        if (pti->flFlags & THRF_TRANSIENT)
    178187            free(pti);
    179         else
    180         {
    181             // for non-transient threads: set exit flags
    182             // V0.9.7 (2000-12-20) [umoeller]
    183             // thread func returns:
    184             pti->fExitComplete = TRUE;
    185             pti->tid = NULLHANDLE;
    186 
    187             if (pti->pfRunning)
    188                 // clear "running" flag
    189                 *(pti->pfRunning) = FALSE;
    190         }
    191     }
     188    }
     189
     190    // thread func exits
    192191}
    193192
Note: See TracChangeset for help on using the changeset viewer.