revert to deleting kernel-level timer from cancellation handler
this is necessary in order to avoid breaking timer_getoverrun in the last run of the timer event handler, if it has not yet finished.
This commit is contained in:
parent
f01d351842
commit
6f1414e102
2 changed files with 11 additions and 7 deletions
|
|
@ -3,11 +3,7 @@
|
|||
|
||||
int timer_delete(timer_t t)
|
||||
{
|
||||
pthread_t td = 0;
|
||||
int r;
|
||||
if ((uintptr_t)t & 1) t = (void *)((unsigned long)t / 2);
|
||||
else td = t, t = td->result;
|
||||
r = __syscall(SYS_timer_delete, (long)t);
|
||||
if (td) pthread_cancel(td);
|
||||
return r;
|
||||
if ((uintptr_t)t & 1)
|
||||
return __syscall(SYS_timer_delete, ((unsigned long)t / 2));
|
||||
return pthread_cancel(t);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue