diff options
author | mtm <mtm@FreeBSD.org> | 2003-12-15 12:38:06 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-12-15 12:38:06 +0000 |
commit | 7be2523683814b5ea9cfd40298e17e6935c5e2d2 (patch) | |
tree | e943809ab285ff27b3e6fbe6b8ff854acf588207 /lib/libthr/thread/thr_kern.c | |
parent | 7ecd6a1166a8499d5dba39c651a55139a9ff0e1e (diff) | |
download | FreeBSD-src-7be2523683814b5ea9cfd40298e17e6935c5e2d2.zip FreeBSD-src-7be2523683814b5ea9cfd40298e17e6935c5e2d2.tar.gz |
Remove _giant_mutex and its associated macros.
Diffstat (limited to 'lib/libthr/thread/thr_kern.c')
-rw-r--r-- | lib/libthr/thread/thr_kern.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c index f99547e..5de6051 100644 --- a/lib/libthr/thread/thr_kern.c +++ b/lib/libthr/thread/thr_kern.c @@ -50,8 +50,6 @@ } \ } while (0) -static sigset_t restore; - void _thread_critical_enter(pthread_t pthread) { @@ -117,73 +115,6 @@ _thread_sigunblock() } } -void -GIANT_LOCK(pthread_t pthread) -{ - sigset_t set; - sigset_t sav; - int error; - - /* - * Block all signals. - */ - SIGFILLSET(set); - - /* - * We can not use the global 'restore' set until after we have - * acquired the giant lock. - */ -#if 0 - error = __sys_sigprocmask(SIG_SETMASK, &set, &sav); - if (error) { - _thread_printf(STDERR_FILENO, "GIANT_LOCK: sig err %d\n", - errno); - abort(); - } -#endif - - error = umtx_lock(&_giant_mutex, pthread->thr_id); - if (error) { - _thread_printf(STDERR_FILENO, "GIANT_LOCK: %d\n", errno); - abort(); - } - - restore = sav; -} - -void -GIANT_UNLOCK(pthread_t pthread) -{ - sigset_t set; - int error; - - /* - * 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; - - error = umtx_unlock(&_giant_mutex, pthread->thr_id); - if (error) { - _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: %d\n", errno); - abort(); - } - -#if 0 - /* - * Restore signals. - */ - error = __sys_sigprocmask(SIG_SETMASK, &set, NULL); - if (error) { - _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: sig err %d\n", - errno); - abort(); - } -#endif -} - int _thread_suspend(pthread_t pthread, struct timespec *abstime) { |