1 #include "pthread_impl.h"
3 void __pthread_register_cancel(struct __ptcb *cb)
5 struct pthread *self = pthread_self();
6 cb->__next = self->cancelbuf;
10 #define pthread_self __pthread_self
12 void __pthread_unregister_cancel(struct __ptcb *cb)
14 struct pthread *self = pthread_self();
15 self->cancelbuf = self->cancelbuf->__next;
18 void __pthread_unwind_next(struct __ptcb *cb)
20 if (cb->__next) longjmp((void *)cb->__next->__jb, 1);
21 pthread_exit(PTHREAD_CANCELLED);