summaryrefslogtreecommitdiff
path: root/src/thread/cancellation.c
blob: ac1af30aeaeb635725f0ceb59b0935f6493c5ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "pthread_impl.h"

void __pthread_register_cancel(struct __ptcb *cb)
{
	struct pthread *self = pthread_self();
	cb->__next = self->cancelbuf;
	self->cancelbuf = cb;
}

void __pthread_unregister_cancel(struct __ptcb *cb)
{
	struct pthread *self = __pthread_self();
	self->cancelbuf = self->cancelbuf->__next;
}