Changeset 49 for trunk/src/helpers/threads.c
- Timestamp:
- Mar 19, 2001, 9:31:25 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/threads.c
r44 r49 139 139 // "Wait" flag set: thrCreate is then 140 140 // waiting on the wait event sem posted 141 // do not post if THRF_WAIT_EXPLICIT! 141 142 DosPostEventSem(pti->hevRunning); 142 143 … … 161 162 ((PTHREADFUNC)pti->pThreadFunc)(pti); 162 163 163 if (pti->flFlags & THRF_WAIT)164 if (pti->flFlags & (THRF_WAIT | THRF_WAIT_EXPLICIT)) // V0.9.9 (2001-03-14) [umoeller] 164 165 // "Wait" flag set: delete semaphore 165 166 DosCloseEventSem(pti->hevRunning); … … 250 251 * typical PM "Worker" thread where you need to disable 251 252 * menu items on thread 1 while the thread is running. 253 * 254 * -- THRF_WAIT_EXPLICIT: like THRF_WAIT, but in this case, 255 * your thread function must post THREADINFO.hevRunning 256 * yourself (thr_fntGeneric will not automatically 257 * post it). Useful for waiting until your own thread 258 * function is fully initialized, e.g. if it creates 259 * an object window. 260 * 261 * WARNING: if your thread forgets to post this, we'll 262 * hang. 263 * 264 * Added V0.9.9 (2001-03-14) [umoeller]. 252 265 * 253 266 * -- THRF_TRANSIENT: creates a "transient" thread where … … 269 282 *@@changed V0.9.9 (2001-02-06) [umoeller]: now returning TID 270 283 *@@changed V0.9.9 (2001-03-07) [umoeller]: added pcszThreadName 284 *@@changed V0.9.9 (2001-03-14) [umoeller]: added THRF_WAIT_EXPLICIT 271 285 */ 272 286 … … 299 313 pti->ulData = ulData; 300 314 301 if (flFlags & THRF_WAIT)315 if (flFlags & (THRF_WAIT | THRF_WAIT_EXPLICIT)) // V0.9.9 (2001-03-14) [umoeller] 302 316 // "Wait" flag set: create an event semaphore which 303 // will be posted by thr_fntGeneric 317 // will be posted by thr_fntGeneric (THRF_WAIT only) 304 318 if (DosCreateEventSem(NULL, // unnamed 305 319 &pti->hevRunning, … … 332 346 } 333 347 334 if (flFlags & THRF_WAIT)348 if (flFlags & (THRF_WAIT | THRF_WAIT_EXPLICIT)) 335 349 { 336 350 // "Wait" flag set: wait on event semaphore 337 // posted by thr_fntGeneric338 351 DosWaitEventSem(pti->hevRunning, 339 352 SEM_INDEFINITE_WAIT);
Note:
See TracChangeset
for help on using the changeset viewer.