| 63 | } |
| 64 | |
| 65 | void CTimer::destroyForThread(int tid) { |
| 66 | if (tid >= _max_timers) { |
| 67 | return; |
| 68 | } |
| 69 | |
| 70 | int timer = _timers[tid]; |
| 71 | if (timer != 0 && __sync_bool_compare_and_swap(&_timers[tid], timer--, 0)) { |
| 72 | syscall(__NR_timer_delete, timer); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | Error CTimer::start(Arguments& args) { |
| 77 | if (!setupThreadHook()) { |