Changeset 25434
- Timestamp:
- 05/10/08 16:34:51 (6 days ago)
- Files:
-
- haiku/trunk/headers/os/kernel/OS.h (modified) (1 diff)
- haiku/trunk/src/system/kernel/thread.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
haiku/trunk/headers/os/kernel/OS.h
r25003 r25434 26 26 27 27 enum { 28 B_TIMEOUT = 8, /* relative timeout */ 29 B_RELATIVE_TIMEOUT = 8, /* fails after a relative timeout with B_WOULD_BLOCK */ 30 B_ABSOLUTE_TIMEOUT = 16 /* fails after an absolute timeout with B_WOULD BLOCK */ 28 B_TIMEOUT = 0x8, /* relative timeout */ 29 B_RELATIVE_TIMEOUT = 0x8, /* fails after a relative timeout 30 with B_TIMED_OUT */ 31 B_ABSOLUTE_TIMEOUT = 0x10, /* fails after an absolute timeout 32 with B_TIMED_OUT */ 33 34 /* experimental Haiku only API */ 35 B_TIMEOUT_REAL_TIME_BASE = 0x40, 36 B_ABSOLUTE_REAL_TIME_TIMEOUT = B_ABSOLUTE_TIMEOUT 37 | B_TIMEOUT_REAL_TIME_BASE 31 38 }; 32 39 haiku/trunk/src/system/kernel/thread.cpp
r25389 r25434 31 31 #include <kscheduler.h> 32 32 #include <ksignal.h> 33 #include <real_time_clock.h> 33 34 #include <smp.h> 34 35 #include <syscalls.h> … … 2272 2273 // otherwise occur between our cancel_timer() and a concurrently 2273 2274 // executing thread_block_timeout(). 2274 uint32 timerFlags = (timeoutFlags & B_RELATIVE_TIMEOUT) 2275 ? B_ONE_SHOT_RELATIVE_TIMER : B_ONE_SHOT_ABSOLUTE_TIMER; 2275 uint32 timerFlags; 2276 if ((timeoutFlags & B_RELATIVE_TIMEOUT) != 0) { 2277 timerFlags = B_ONE_SHOT_RELATIVE_TIMER; 2278 } else { 2279 timerFlags = B_ONE_SHOT_ABSOLUTE_TIMER; 2280 if ((timeoutFlags & B_TIMEOUT_REAL_TIME_BASE) != 0) 2281 timeout -= rtc_boot_time(); 2282 } 2276 2283 timerFlags |= B_TIMER_ACQUIRE_THREAD_LOCK; 2277 2284
