Changeset 1988
- Timestamp:
- Jun 5, 2005, 2:51:37 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/sys/b_signalTimer.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1987 r1988 64 64 static volatile unsigned gfTerminate; 65 65 /** Timer handle. */ 66 static volatile HTIMER ghTimer ;66 static volatile HTIMER ghTimer = ~0U; 67 67 68 68 … … 162 162 { 163 163 __atomic_xchg(&gfOneShot, 0); 164 __atomic_xchg((volatile unsigned *)(void *)&ghTimer, 0);164 __atomic_xchg((volatile unsigned *)(void *)&ghTimer, ~0U); 165 165 if (guInterval) 166 166 { … … 225 225 226 226 /* kill timer. */ 227 HTIMER hTimer = ghTimer; 228 if (hTimer) 229 { 230 ghTimer = NULLHANDLE; 227 HTIMER hTimer = (HTIMER)__atomic_xchg((volatile unsigned *)(void *)&ghTimer, ~0U); 228 if (hTimer != ~0U) 231 229 DosStopTimer(hTimer); 232 }233 230 234 231 __atomic_xchg(>idWorker, 0); … … 273 270 274 271 /* kill timer. */ 275 HTIMER hTimer = ghTimer; 276 if (hTimer) 277 { 278 ghTimer = NULLHANDLE; 272 HTIMER hTimer = (HTIMER)__atomic_xchg((volatile unsigned *)(void *)&ghTimer, ~0U); 273 if (hTimer != ~0U) 279 274 DosStopTimer(hTimer); 280 } 281 282 /* kill the thread (it should've got the clue by now, but just in case) */ 275 276 /* kill the thread (it should've taken the hints by now, but just in case) */ 283 277 TID tid = gtidWorker; 284 278 if (tid) … … 396 390 { 397 391 __atomic_xchg(&gfArmed, 0); 398 if (ghTimer) 399 { 400 HTIMER hTimer = ghTimer; 392 HTIMER hTimer = (HTIMER)__atomic_xchg((volatile unsigned *)(void *)&ghTimer, ~0U); 393 if (hTimer != ~0U) 401 394 rc = DosStopTimer(hTimer); 402 ghTimer = NULLHANDLE;403 }404 395 } 405 396 … … 438 429 ghevTimer = NULLHANDLE; 439 430 gfTerminate = 0; 440 ghTimer = NULLHANDLE;431 ghTimer = ~0U; 441 432 rc = DosCreateEventSem(NULL, (PHEV)&ghevTimer, DC_SEM_SHARED, FALSE); 442 433 if (!rc) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.