diff options
| author | Mike Makonnen <mtm@FreeBSD.org> | 2003-05-23 10:28:13 +0000 |
|---|---|---|
| committer | Mike Makonnen <mtm@FreeBSD.org> | 2003-05-23 10:28:13 +0000 |
| commit | b32a99e5f491c83764390db17be9d213e7f60b6c (patch) | |
| tree | da35acaaed6829d2ee3417124efd54aaecc7128a /lib/libthr/thread/thr_kern.c | |
| parent | 7d9d7ca2ed3e3d630e63482c41f2d26194129c2c (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_kern.c')
| -rw-r--r-- | lib/libthr/thread/thr_kern.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c index 7d10c5fe5540..77b0094e0738 100644 --- a/lib/libthr/thread/thr_kern.c +++ b/lib/libthr/thread/thr_kern.c @@ -73,8 +73,7 @@ _thread_critical_enter(pthread_t pthread) errno); abort(); } - - restore = sav; + curthread->savedsig = sav; } void @@ -83,16 +82,9 @@ _thread_critical_exit(pthread_t pthread) sigset_t set; /* - * restore is protected by giant. We could restore our signal state - * incorrectly if someone else set restore between unlocking giant - * and restoring the signal mask. To avoid this we cache a copy prior - * to the unlock. - */ - set = restore; - - /* * Restore signals. */ + set = curthread->savedsig; if (__sys_sigprocmask(SIG_SETMASK, &set, NULL)) { _thread_printf(STDERR_FILENO, "Critical Exit: sig err %d\n", errno); |
