summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-03-29 05:45:01 +0000
committermtm <mtm@FreeBSD.org>2004-03-29 05:45:01 +0000
commite5540ff230f379d3d15cf7dc551b53dd5442efb5 (patch)
treeec90ed138c009883ef33155bc275d6b1ab0b0fe9 /lib/libthr
parente706cf764f4fe3dbd460e17b11a7f243d22590ed (diff)
downloadFreeBSD-src-e5540ff230f379d3d15cf7dc551b53dd5442efb5.zip
FreeBSD-src-e5540ff230f379d3d15cf7dc551b53dd5442efb5.tar.gz
o Remove more references to SIGTHR
o Remove clock resolution information left over from libc_r
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_init.c51
-rw-r--r--lib/libthr/thread/thr_private.h7
2 files changed, 0 insertions, 58 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c
index d74ed2d..cb2cd2a 100644
--- a/lib/libthr/thread/thr_init.c
+++ b/lib/libthr/thread/thr_init.c
@@ -66,14 +66,6 @@
#include "thr_private.h"
-/*
- * Early implementations of sigtimedwait interpreted the signal
- * set incorrectly.
- */
-#define SIGTIMEDWAIT_SET_IS_INVERTED(osreldate) \
- ((500100 <= (osreldate) && (osreldate) <= 500113) || \
- (osreldate) == 501000 || (osreldate) == 501100)
-
extern void _thread_init_hack(void);
/*
@@ -252,13 +244,8 @@ _thread_init(void)
int i;
size_t len;
int mib[2];
- sigset_t set;
- int osreldate;
int error;
- struct clockinfo clockinfo;
- struct sigaction act;
-
/* Check if this function has already been called: */
if (_thread_initial)
/* Only initialise the threaded application once. */
@@ -362,44 +349,6 @@ _thread_init(void)
&_thread_sigact[i - 1]) != 0)
PANIC("Cannot read signal handler info");
}
- act.sa_sigaction = _thread_sig_wrapper;
- act.sa_flags = SA_SIGINFO;
- SIGFILLSET(act.sa_mask);
-
- if (__sys_sigaction(SIGTHR, &act, NULL))
- PANIC("Cannot set SIGTHR handler.\n");
-
- SIGEMPTYSET(set);
- SIGADDSET(set, SIGTHR);
- __sys_sigprocmask(SIG_BLOCK, &set, 0);
-
- /*
- * Precompute the signal set used by _thread_suspend to wait
- * for SIGTHR.
- */
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSRELDATE;
- len = sizeof(osreldate);
- if (sysctl(mib, 2, &osreldate, &len, NULL, 0) == 0 &&
- SIGTIMEDWAIT_SET_IS_INVERTED(osreldate)) {
- /* Kernel bug requires an inverted signal set. */
- SIGFILLSET(_thread_suspend_sigset);
- SIGDELSET(_thread_suspend_sigset, SIGTHR);
- } else {
- SIGEMPTYSET(_thread_suspend_sigset);
- SIGADDSET(_thread_suspend_sigset, SIGTHR);
- }
-#ifdef _PTHREADS_INVARIANTS
- SIGADDSET(_thread_suspend_sigset, SIGALRM);
-#endif
-
- /* Get the kernel clockrate: */
- mib[0] = CTL_KERN;
- mib[1] = KERN_CLOCKRATE;
- len = sizeof (struct clockinfo);
- if (sysctl(mib, 2, &clockinfo, &len, NULL, 0) == 0)
- _clock_res_usec = clockinfo.tick > CLOCK_RES_USEC_MIN ?
- clockinfo.tick : CLOCK_RES_USEC_MIN;
}
/*
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 901c26f..22ea185 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -712,13 +712,6 @@ SCLASS struct pthread_cond_attr pthread_condattr_default
;
#endif
-SCLASS int _clock_res_usec /* Clock resolution in usec. */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= CLOCK_RES_USEC;
-#else
-;
-#endif
-
/*
* Array of signal actions for this process.
*/
OpenPOWER on IntegriCloud