musl/src/thread/cancellation.c
Rich Felker 5f37fc132a further debloat cancellation handlers
cleanup push and pop are also no-ops if pthread_exit is not reachable.
this can make a big difference for library code which needs to protect
itself against cancellation, but which is unlikely to actually be used
in programs with threads/cancellation.
2011-08-03 19:57:46 -04:00

24 lines
441 B
C

#include "pthread_impl.h"
static void dummy(struct __ptcb *cb)
{
}
weak_alias(dummy, __pthread_do_unwind);
weak_alias(dummy, __pthread_do_register);
weak_alias(dummy, __pthread_do_unregister);
void __pthread_unwind_next(struct __ptcb *cb)
{
__pthread_do_unwind(cb);
}
void __pthread_register_cancel(struct __ptcb *cb)
{
__pthread_do_register(cb);
}
void __pthread_unregister_cancel(struct __ptcb *cb)
{
__pthread_do_unregister(cb);
}