small fix for new pthread cleanup stuff
[musl] / src / thread / cancellation.c
1 #include "pthread_impl.h"
2
3 void __do_cleanup_push();
4 void __do_cleanup_pop();
5
6 void _pthread_cleanup_push(struct __ptcb *cb, void (*f)(void *), void *x)
7 {
8         __do_cleanup_push(cb, f, x);
9 }
10
11 void _pthread_cleanup_pop(struct __ptcb *cb, int run)
12 {
13         __do_cleanup_pop(cb, run);
14         if (run) cb->__f(cb->__x);
15 }
16
17 static void dummy()
18 {
19 }
20 weak_alias(dummy, __do_cleanup_push);
21 weak_alias(dummy, __do_cleanup_pop);