Implements PosixSignals with help of POSIX interface.
PosixSignals Linuximpl | Implements PosixSignals with help of POSIX interface. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file of PosixSignals. |
C-kern/ | Linux specific implementation PosixSignals Linuximpl. |
Types | |
struct signalhandler_t | Exports signalhandler_t into global namespace. |
signalhandler_t | Describes an overwritten signal handler. |
isvalid | Indicates if this structure contains valid information. |
handler | Function pointer to new signal handler. |
oldstate | Contains old signal handler configuration. |
s_signalhandler | Stores global configuration information for signal handlers. |
s_signalhandler_oldmask | Stores old signal mask. |
helper | |
dispatcher_signalhandler | This signal handler is called for every signal. |
clear_signalhandler | Restores the default signal handler of the platform. |
set_signalhandler | Overwrites a previously set signal handler with sighandler. |
setignore_signalhandler | Sets signal handler which consumes and ignores signal signr. |
init | |
query | |
change | |
signalstate_t | System specific declaration. |
nr_signal_handlers | Number of stored signal handlers. |
signalmask | The signal mask of the current thread. |
signal_handlers | Stores setting for every signal handler. |
helper | |
nrhandlers_signalstate | Returns the number of valid signal handlers. |
objectsize_signalstate | Returns size in bytes needed to store a single signalstate_t. |
lifetime | |
query | |
signalwait_t | |
lifetime | |
free_signalwait | Frees all resources associated with signalwait. |
signalrt_t | |
query | |
change | |
test |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2011 Jörg Seebohn
Header file of PosixSignals.
Linux specific implementation PosixSignals Linuximpl.
typedef struct signalhandler_t signalhandler_t
Exports signalhandler_t into global namespace.
struct signalhandler_t
Describes an overwritten signal handler.
isvalid | Indicates if this structure contains valid information. |
handler | Function pointer to new signal handler. |
oldstate | Contains old signal handler configuration. |
s_signalhandler | Stores global configuration information for signal handlers. |
s_signalhandler_oldmask | Stores old signal mask. |
helper | |
dispatcher_signalhandler | This signal handler is called for every signal. |
clear_signalhandler | Restores the default signal handler of the platform. |
set_signalhandler | Overwrites a previously set signal handler with sighandler. |
setignore_signalhandler | Sets signal handler which consumes and ignores signal signr. |
init | |
query | |
change |
struct sigaction oldstate
Contains old signal handler configuration. This value is set in initonce_signalhandler before the signal handler is overwritten.
static signalhandler_t s_signalhandler[64]
Stores global configuration information for signal handlers. See signalhandler_t. All values in the array are set in initonce_signalhandler.
static sigset_t s_signalhandler_oldmask
Stores old signal mask. This value is set in initonce_signalhandler before the signal mask is changed.
struct signalstate_t
System specific declaration.
nr_signal_handlers | Number of stored signal handlers. |
signalmask | The signal mask of the current thread. |
signal_handlers | Stores setting for every signal handler. |
helper | |
nrhandlers_signalstate | Returns the number of valid signal handlers. |
objectsize_signalstate | Returns size in bytes needed to store a single signalstate_t. |
lifetime | |
query |
static size_t objectsize_signalstate( void )
Returns size in bytes needed to store a single signalstate_t.
lifetime | |
free_signalwait | Frees all resources associated with signalwait. |
int free_signalwait( signalwait_t * signalwait )
Frees all resources associated with signalwait. After return the iochannel_t returned from io_signalwait is invalid.
Exports signalhandler_t into global namespace.
typedef struct signalhandler_t signalhandler_t
Describes an overwritten signal handler.
struct signalhandler_t
Indicates if this structure contains valid information.
bool isvalid
Function pointer to new signal handler.
signalhandler_f handler
Contains old signal handler configuration.
struct sigaction oldstate
Stores global configuration information for signal handlers.
static signalhandler_t s_signalhandler[64]
Stores old signal mask.
static sigset_t s_signalhandler_oldmask
This signal handler is called for every signal.
static void dispatcher_signalhandler( int signr, siginfo_t * siginfo, void * ucontext )
Restores the default signal handler of the platform.
static int clear_signalhandler( unsigned signr )
Overwrites a previously set signal handler with sighandler.
static int set_signalhandler( unsigned signr, signalhandler_f sighandler )
Sets signal handler which consumes and ignores signal signr.
static int setignore_signalhandler( unsigned signr )
System specific declaration.
struct signalstate_t
Number of stored signal handlers.
int nr_signal_handlers
The signal mask of the current thread.
sigset_t signalmask
Stores setting for every signal handler.
struct sigaction signal_handlers[/*nr_signal_handlers*/]
Returns the number of valid signal handlers.
static int nrhandlers_signalstate( void )
Returns size in bytes needed to store a single signalstate_t.
static size_t objectsize_signalstate( void )
Frees all resources associated with signalwait.
int free_signalwait( signalwait_t * signalwait )
Sets up a process wide signal handler and signal masks at process initialization.
int initonce_signalhandler( void )
Describes an input/output channel like a file or network connection.
typedef sys_iochannel_t iochannel_t
Implement signalwait_t.io_signalwait.
#define io_signalwait( signalwait ) ((sys_iochannel_t)signalwait)