diff options
| author | Jonathan Mini <mini@FreeBSD.org> | 2003-02-17 10:05:18 +0000 |
|---|---|---|
| committer | Jonathan Mini <mini@FreeBSD.org> | 2003-02-17 10:05:18 +0000 |
| commit | faa8342f9f1693c64e42b92c2fbbff1c3597d269 (patch) | |
| tree | c24155922d6dce25dde63eab941dbc318206ebdf /lib/libpthread/thread/thr_private.h | |
| parent | 96d7f8ef4663a90a8826c0b5ab56e9036dcb8506 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_private.h')
| -rw-r--r-- | lib/libpthread/thread/thr_private.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index 8aacdc0c7ee6..7c5cc87afc54 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -426,6 +426,8 @@ enum pthread_state { PS_COND_WAIT, PS_SLEEP_WAIT, PS_WAIT_WAIT, + PS_SIGSUSPEND, + PS_SIGWAIT, PS_SPINBLOCK, PS_JOIN, PS_SUSPENDED, @@ -445,6 +447,7 @@ enum pthread_state { union pthread_wait_data { pthread_mutex_t mutex; pthread_cond_t cond; + const sigset_t *sigwait; /* Waiting on a signal in sigwait */ spinlock_t *spinlock; struct pthread *thread; }; @@ -461,6 +464,15 @@ struct join_status { int error; }; +struct pthread_state_data { + struct timespec psd_wakeup_time; + union pthread_wait_data psd_wait_data; + enum pthread_state psd_state; + int psd_flags; + int psd_interrupted; + int psd_sig_defer_count; +}; + struct pthread_specific_elem { const void *data; int seqno; @@ -515,6 +527,9 @@ struct pthread { thread_continuation_t continuation; + /* Currently pending signals. */ + sigset_t sigpend; + /* Thread state: */ enum pthread_state state; @@ -590,6 +605,9 @@ struct pthread { */ int interrupted; + /* Signal number when in state PS_SIGWAIT: */ + int signo; + /* * Set to non-zero when this thread has deferred signals. * We allow for recursive deferral. @@ -774,6 +792,11 @@ SCLASS pthread_cond_t _gc_cond ; /* + * Array of signal actions for this process. + */ +SCLASS struct sigaction _thread_sigact[NSIG]; + +/* * Scheduling queues: */ SCLASS pq_queue_t _readyq; @@ -799,6 +822,12 @@ SCLASS pthread_switch_routine_t _sched_switch_hook ; /* + * Signals pending and masked. + */ +SCLASS sigset_t _thread_sigpending; +SCLASS sigset_t _thread_sigmask; + +/* * Declare the kernel scheduler jump buffer and stack: */ SCLASS struct kse_mailbox _thread_kern_kse_mailbox; @@ -893,6 +922,7 @@ void _thread_kern_sched_state_unlock(enum pthread_state state, void _thread_kern_set_timeout(const struct timespec *); void _thread_kern_sig_defer(void); void _thread_kern_sig_undefer(void); +void _thread_sig_handler(int, siginfo_t *, ucontext_t *); void _thread_printf(int fd, const char *, ...); void _thread_start(void); void _thread_seterrno(pthread_t, int); |
