diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-29 12:58:22 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-29 12:58:22 -0400 |
commit | bf619d82c82052741323aa63c107fbd346c8aaba (patch) | |
tree | 11f97d73195bb633df6c6e679ab65a7f8f0fd477 /src/internal | |
parent | 70c31c7bd779400d2eb56dcb4075bb37227081db (diff) | |
download | musl-bf619d82c82052741323aa63c107fbd346c8aaba.zip musl-bf619d82c82052741323aa63c107fbd346c8aaba.tar.gz musl-bf619d82c82052741323aa63c107fbd346c8aaba.tar.bz2 |
major improvements to cancellation handling
- there is no longer any risk of spoofing cancellation requests, since
the cancel flag is set in pthread_cancel rather than in the signal
handler.
- cancellation signal is no longer unblocked when running the
cancellation handlers. instead, pthread_create will cause any new
threads created from a cancellation handler to unblock their own
cancellation signal.
- various tweaks in preparation for POSIX timer support.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/libc.h | 1 | ||||
-rw-r--r-- | src/internal/pthread_impl.h | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/internal/libc.h b/src/internal/libc.h index bbbb3a4..c83fcaf 100644 --- a/src/internal/libc.h +++ b/src/internal/libc.h @@ -18,6 +18,7 @@ struct __libc { FILE *ofl_head; int ofl_lock; void (*lockfile)(FILE *); + void (*sigtimer)(); }; diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 615b963..f2d0ae8 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -41,10 +41,14 @@ struct pthread { long off; void *pending; } robust_list; + int unblock_cancel; }; struct __timer { - struct sigevent sev; + int timerid; + union sigval val; + void (*notify)(union sigval); + pthread_t thread; }; #define __SU (sizeof(size_t)/sizeof(int)) @@ -73,7 +77,6 @@ struct __timer { #define SIGCANCEL 32 #define SIGSYSCALL 33 -#define SIGTIMER 32 /* ?? */ int __set_thread_area(void *); int __libc_sigaction(int, const struct sigaction *, struct sigaction *); |