timer_delete.c 196 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6 7
#include <time.h>
#include "pthread_impl.h"

int timer_delete(timer_t t)
{
	if (t->thread) pthread_cancel(t->thread);
	else {
8
		__syscall(SYS_timer_delete, t->timerid);
R
Rich Felker 已提交
9 10 11 12
		free(t);
	}
	return 0;
}