summaryrefslogtreecommitdiff
path: root/src/time/timer_delete.c
blob: caf048954c040c36e7d98806400b687f56da0710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <time.h>
#include "pthread_impl.h"

int timer_delete(timer_t t)
{
	if (t->thread) pthread_cancel(t->thread);
	else {
		__syscall(SYS_timer_delete, t->timerid);
		free(t);
	}
	return 0;
}