signal.c File Reference

#include "thread.h"

Functions

int ns_sigmask (int how, sigset_t *set, sigset_t *oset)
int ns_signal (int sig, void(*proc)(int))
int ns_sigwait (sigset_t *set, int *sig)

Function Documentation

int ns_sigmask ( int  how,
sigset_t *  set,
sigset_t *  oset 
)

----------------------------------------------------------------------

ns_sigmask --

Set the thread's signal mask.

Results: 0 on success, otherwise an error code.

Side effects: See pthread_sigmask.

----------------------------------------------------------------------

int ns_signal ( int  sig,
void(*)(int)  proc 
)

----------------------------------------------------------------------

ns_signal --

Install a process-wide signal handler. Note that the handler is shared among all threads (although the signal mask is per-thread).

Results: 0 on success, -1 on error with specific error code set in errno.

Side effects: Handler will be called when signal is received in this thread.

----------------------------------------------------------------------

int ns_sigwait ( sigset_t *  set,
int *  sig 
)

----------------------------------------------------------------------

ns_sigwait --

Posix style sigwait().

Results: 0 on success, otherwise an error code.

Side effects: None.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:57 2007 by  doxygen 1.5.1