123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #include <stdlib.h>
- #include "pthreadP.h"
- void
- __cleanup_fct_attribute
- __pthread_register_cancel (__pthread_unwind_buf_t *buf)
- {
- struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
- struct pthread *self = THREAD_SELF;
-
- ibuf->priv.data.prev = THREAD_GETMEM (self, cleanup_jmp_buf);
- ibuf->priv.data.cleanup = THREAD_GETMEM (self, cleanup);
-
- THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf);
- }
- hidden_def (__pthread_register_cancel)
- void
- __cleanup_fct_attribute
- __pthread_unregister_cancel (__pthread_unwind_buf_t *buf)
- {
- struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
- THREAD_SETMEM (THREAD_SELF, cleanup_jmp_buf, ibuf->priv.data.prev);
- }
- hidden_def (__pthread_unregister_cancel)
|