diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-02-20 20:25:35 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-20 20:25:35 -0500 |
commit | f409338a9e808a09001669377c608fd2803d808d (patch) | |
tree | 2eb5478cc7177d8480ed252cc8004d1b102f5acf /src/thread/pthread_cancel.c | |
parent | 6bea5dc69892cd9ff0c222474e7dd468c29dfa75 (diff) | |
download | musl-f409338a9e808a09001669377c608fd2803d808d.tar.gz musl-f409338a9e808a09001669377c608fd2803d808d.tar.xz musl-f409338a9e808a09001669377c608fd2803d808d.zip |
prepare cancellation syscall asm for possibility of __cancel returning
Diffstat (limited to 'src/thread/pthread_cancel.c')
-rw-r--r-- | src/thread/pthread_cancel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c index 4493931e..66e0817c 100644 --- a/src/thread/pthread_cancel.c +++ b/src/thread/pthread_cancel.c @@ -1,11 +1,18 @@ #include "pthread_impl.h" #include "syscall.h" +#include "libc.h" void __cancel() { pthread_exit(PTHREAD_CANCELED); } +/* If __syscall_cp_asm has adjusted the stack pointer, it must provide a + * definition of __cp_cancel to undo those adjustments and call __cancel. + * Otherwise, __cancel provides a definition for __cp_cancel. */ + +weak_alias(__cancel, __cp_cancel); + long __syscall_cp_asm(volatile void *, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t); |