summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_init.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2002-02-09 19:58:41 +0000
committerdeischen <deischen@FreeBSD.org>2002-02-09 19:58:41 +0000
commit4ed9f7fd062cd8c757f7325cad3bc2ea2c340e84 (patch)
treedc39d813fe8f056c1b1cfa1a5216fba9998c6103 /lib/libpthread/thread/thr_init.c
parent04de78234927ede2f34f9b1286fb8344dafa63fc (diff)
downloadFreeBSD-src-4ed9f7fd062cd8c757f7325cad3bc2ea2c340e84.zip
FreeBSD-src-4ed9f7fd062cd8c757f7325cad3bc2ea2c340e84.tar.gz
This has been sitting in my local tree long enough. Remove the use
of an alternate signal stack for handling signals. Let the kernel send signals on the stack of the current thread and teach the threads signal handler how to deliver signals to the current thread if it needs to. Also, always store a threads context as a jmp_buf. Eventually this will change to be a ucontext_t or mcontext_t. Other small nits. Use struct pthread * instead of pthread_t in internal library routines. The threads code wants struct pthread *, and pthread_t doesn't necessarily have to be the same. Reviewed by: jasone
Diffstat (limited to 'lib/libpthread/thread/thr_init.c')
-rw-r--r--lib/libpthread/thread/thr_init.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c
index cac38dc..689e85b 100644
--- a/lib/libpthread/thread/thr_init.c
+++ b/lib/libpthread/thread/thr_init.c
@@ -334,7 +334,6 @@ _thread_init(void)
/* Initialize the initial context: */
_thread_initial->curframe = NULL;
- _thread_initial->ctxtype = CTX_JB_NOSIG;
/* Initialise the rest of the fields: */
_thread_initial->poll_data.nfds = 0;
@@ -360,17 +359,6 @@ _thread_init(void)
/* Clear the signal queue: */
memset(_thread_sigq, 0, sizeof(_thread_sigq));
- /*
- * Create and install an alternate signal stack of
- * the recommended size:
- */
- _thread_sigstack.ss_sp = malloc(SIGSTKSZ);
- _thread_sigstack.ss_size = SIGSTKSZ;
- _thread_sigstack.ss_flags = 0;
- if ((_thread_sigstack.ss_sp == NULL) ||
- (__sys_sigaltstack(&_thread_sigstack, NULL) != 0))
- PANIC("Unable to install alternate signal stack");
-
/* Enter a loop to get the existing signal status: */
for (i = 1; i < NSIG; i++) {
/* Check for signals which cannot be trapped: */
OpenPOWER on IntegriCloud