Tizen RT Libs&Environment  v1.1 D4

Provides APIs for Signal. More...

Collaboration diagram for SIGNAL:

Files

file  signal.h
 Signal APIs.
 

Data Structures

union  sigval
 Union for defining the types of the siginfo si_value field. More...
 
struct  sigevent
 Structure for elements that define a queue signal. The following is used to attach a signal to a message queue to notify a task when a message is available on a queue. More...
 
struct  siginfo
 Structure for using to pass parameters to/from signal handlers. More...
 
struct  sigaction
 Structure for defining the action to take for given signal. More...
 

Macros

#define NULL_SIGNAL_SET   ((sigset_t)0x00000000)
 
#define ALL_SIGNAL_SET   ((sigset_t)0xffffffff)
 
#define MIN_SIGNO   0
 
#define MAX_SIGNO   31
 
#define GOOD_SIGNO(s)   ((((unsigned)(s)) <= MAX_SIGNO))
 
#define SIGNO2SET(s)   ((sigset_t)1 << (s))
 
#define SIGRTMIN   MIN_SIGNO /* First real time signal */
 
#define SIGRTMAX   MAX_SIGNO /* Last real time signal */
 
#define SIGUSR1   1 /* User signal 1 */
 
#define SIGUSR2   2 /* User signal 2 */
 
#define SIGALRM   3 /* Default signal used with POSIX timers (used only */
 
#define SIGCHLD   4 /* Used by child threads to signal parent thread */
 
#define SIGKILL   9 /* Sent to cause process to terminate */
 
#define SIGCONDTIMEDOUT   16 /* Used in the implementation of pthread_cond_timedwait */
 
#define SIG_BLOCK   1 /* Block the given signals */
 
#define SIG_UNBLOCK   2 /* Unblock the given signals */
 
#define SIG_SETMASK   3 /* Set the signal mask to the current set */
 
#define SA_NOCLDSTOP
 
#define SA_SIGINFO
 
#define SA_NOCLDWAIT
 
#define SI_USER   0 /* Signal sent from kill, raise, or abort */
 
#define SI_QUEUE   1 /* Signal sent from sigqueue */
 
#define SI_TIMER   2 /* Signal is result of timer expiration */
 
#define SI_ASYNCIO   3 /* Signal is the result of asynch IO completion */
 
#define SI_MESGQ   4 /* Signal generated by arrival of a message on an */
 
#define CLD_EXITED   5 /* Child has exited (SIGCHLD only) */
 
#define CLD_KILLED   6 /* Child was killed (SIGCHLD only) */
 
#define CLD_DUMPED   7 /* Child terminated abnormally (SIGCHLD only) */
 
#define CLD_TRAPPED   8 /* Traced child has trapped (SIGCHLD only) */
 
#define CLD_STOPPED   9 /* Child has stopped (SIGCHLD only) */
 
#define CLD_CONTINUED   10 /* Stopped child had continued (SIGCHLD only) */
 
#define SIGEV_NONE   0 /* No notification desired */
 
#define SIGEV_SIGNAL   1 /* Notify via signal */
 
#define SIG_ERR   ((_sa_handler_t)-1)
 
#define SIG_DFL   ((_sa_handler_t)0)
 
#define SIG_IGN   ((_sa_handler_t)0)
 
#define SIG_HOLD   ((_sa_handler_t)1) /* Used only with sigset() */
 
#define sa_handler   sa_u._sa_handler
 
#define sa_sigaction   sa_u._sa_sigaction
 

Typedefs

typedef uint32_t sigset_t
 
typedef struct siginfo siginfo_t
 
typedef CODE void(* _sa_handler_t) (int)
 
typedef CODE void(* _sa_sigaction_t) (int, FAR siginfo_t *, FAR void *)
 

Functions

int kill (pid_t pid, int sig)
 send a signal to a process or a group of processes More...
 
int sigemptyset (FAR sigset_t *set)
 initialize and empty a signal set More...
 
int sigfillset (FAR sigset_t *set)
 initialize and fill a signal set More...
 
int sigaddset (FAR sigset_t *set, int signo)
 add a signal to a signal set More...
 
int sigdelset (FAR sigset_t *set, int signo)
 delete a signal from a signal set More...
 
int sigismember (FAR const sigset_t *set, int signo)
 test for a signal in a signal set More...
 
int sighold (int sig)
 signal management More...
 
int sigignore (int sig)
 signal management More...
 
int sigpause (int sig)
 signal management More...
 
int raise (int sig)
 send a signal to the executing process More...
 
int sigrelse (int sig)
 signal management More...
 
int sigaction (int sig, FAR const struct sigaction *act, FAR struct sigaction *oact)
 examine and change a signal action More...
 
int sigprocmask (int how, FAR const sigset_t *set, FAR sigset_t *oset)
 examine and change blocked signals More...
 
int sigpending (FAR sigset_t *set)
 examine pending signals More...
 
int sigsuspend (FAR const sigset_t *sigmask)
 wait for a signal More...
 
int sigwaitinfo (FAR const sigset_t *set, FAR struct siginfo *value)
 wait for queued signals More...
 
int sigtimedwait (FAR const sigset_t *set, FAR struct siginfo *value, FAR const struct timespec *timeout)
 wait for queued signals More...
 
int sigqueue (int pid, int signo, union sigval value)
 queue a signal to a process More...
 

Variables

CODE void(*)(int sig) sigset (int sig, CODE void(*func)(int sig))
 signal management More...
 
CODE void(*)(int sig) signal (int sig, CODE void(*func)(int sig))
 signal management More...
 

Detailed Description

Provides APIs for Signal.

Macro Definition Documentation

◆ ALL_SIGNAL_SET

#define ALL_SIGNAL_SET   ((sigset_t)0xffffffff)

Definition at line 83 of file signal.h.

◆ CLD_CONTINUED

#define CLD_CONTINUED   10 /* Stopped child had continued (SIGCHLD only) */

Definition at line 194 of file signal.h.

◆ CLD_DUMPED

#define CLD_DUMPED   7 /* Child terminated abnormally (SIGCHLD only) */

Definition at line 191 of file signal.h.

◆ CLD_EXITED

#define CLD_EXITED   5 /* Child has exited (SIGCHLD only) */

Definition at line 189 of file signal.h.

◆ CLD_KILLED

#define CLD_KILLED   6 /* Child was killed (SIGCHLD only) */

Definition at line 190 of file signal.h.

◆ CLD_STOPPED

#define CLD_STOPPED   9 /* Child has stopped (SIGCHLD only) */

Definition at line 193 of file signal.h.

◆ CLD_TRAPPED

#define CLD_TRAPPED   8 /* Traced child has trapped (SIGCHLD only) */

Definition at line 192 of file signal.h.

◆ GOOD_SIGNO

#define GOOD_SIGNO (   s)    ((((unsigned)(s)) <= MAX_SIGNO))

Definition at line 86 of file signal.h.

◆ MAX_SIGNO

#define MAX_SIGNO   31

Definition at line 85 of file signal.h.

◆ MIN_SIGNO

#define MIN_SIGNO   0

Definition at line 84 of file signal.h.

◆ NULL_SIGNAL_SET

#define NULL_SIGNAL_SET   ((sigset_t)0x00000000)

Definition at line 82 of file signal.h.

◆ sa_handler

#define sa_handler   sa_u._sa_handler

Definition at line 275 of file signal.h.

◆ SA_NOCLDSTOP

#define SA_NOCLDSTOP
Value:
(1 << 0) /* Do not generate SIGCHILD when
* children stop (ignored) */

Definition at line 173 of file signal.h.

◆ SA_NOCLDWAIT

#define SA_NOCLDWAIT
Value:
(1 << 2) /* If signo=SIGCHLD, exit status of child
* processes will be discarded */

Definition at line 178 of file signal.h.

◆ sa_sigaction

#define sa_sigaction   sa_u._sa_sigaction

Definition at line 276 of file signal.h.

◆ SA_SIGINFO

#define SA_SIGINFO
Value:
(1 << 1) /* Invoke the signal-catching function
* with 3 args instead of 1
* (always assumed) */

Definition at line 175 of file signal.h.

◆ SI_ASYNCIO

#define SI_ASYNCIO   3 /* Signal is the result of asynch IO completion */

Definition at line 186 of file signal.h.

◆ SI_MESGQ

#define SI_MESGQ   4 /* Signal generated by arrival of a message on an */

Definition at line 187 of file signal.h.

◆ SI_QUEUE

#define SI_QUEUE   1 /* Signal sent from sigqueue */

Definition at line 184 of file signal.h.

◆ SI_TIMER

#define SI_TIMER   2 /* Signal is result of timer expiration */

Definition at line 185 of file signal.h.

◆ SI_USER

#define SI_USER   0 /* Signal sent from kill, raise, or abort */

Definition at line 183 of file signal.h.

◆ SIG_BLOCK

#define SIG_BLOCK   1 /* Block the given signals */

Definition at line 167 of file signal.h.

◆ SIG_DFL

#define SIG_DFL   ((_sa_handler_t)0)

Definition at line 204 of file signal.h.

◆ SIG_ERR

#define SIG_ERR   ((_sa_handler_t)-1)

Definition at line 203 of file signal.h.

◆ SIG_HOLD

#define SIG_HOLD   ((_sa_handler_t)1) /* Used only with sigset() */

Definition at line 206 of file signal.h.

◆ SIG_IGN

#define SIG_IGN   ((_sa_handler_t)0)

Definition at line 205 of file signal.h.

◆ SIG_SETMASK

#define SIG_SETMASK   3 /* Set the signal mask to the current set */

Definition at line 169 of file signal.h.

◆ SIG_UNBLOCK

#define SIG_UNBLOCK   2 /* Unblock the given signals */

Definition at line 168 of file signal.h.

◆ SIGALRM

#define SIGALRM   3 /* Default signal used with POSIX timers (used only */

Definition at line 117 of file signal.h.

◆ SIGCHLD

#define SIGCHLD   4 /* Used by child threads to signal parent thread */

Definition at line 125 of file signal.h.

◆ SIGCONDTIMEDOUT

#define SIGCONDTIMEDOUT   16 /* Used in the implementation of pthread_cond_timedwait */

Definition at line 149 of file signal.h.

◆ SIGEV_NONE

#define SIGEV_NONE   0 /* No notification desired */

Definition at line 198 of file signal.h.

◆ SIGEV_SIGNAL

#define SIGEV_SIGNAL   1 /* Notify via signal */

Definition at line 199 of file signal.h.

◆ SIGKILL

#define SIGKILL   9 /* Sent to cause process to terminate */

Definition at line 140 of file signal.h.

◆ SIGNO2SET

#define SIGNO2SET (   s)    ((sigset_t)1 << (s))

Definition at line 87 of file signal.h.

◆ SIGRTMAX

#define SIGRTMAX   MAX_SIGNO /* Last real time signal */

Definition at line 92 of file signal.h.

◆ SIGRTMIN

#define SIGRTMIN   MIN_SIGNO /* First real time signal */

Definition at line 91 of file signal.h.

◆ SIGUSR1

#define SIGUSR1   1 /* User signal 1 */

Definition at line 105 of file signal.h.

◆ SIGUSR2

#define SIGUSR2   2 /* User signal 2 */

Definition at line 111 of file signal.h.

Typedef Documentation

◆ _sa_handler_t

typedef CODE void(* _sa_handler_t) (int)

Definition at line 257 of file signal.h.

◆ _sa_sigaction_t

typedef CODE void(* _sa_sigaction_t) (int, FAR siginfo_t *, FAR void *)

Definition at line 258 of file signal.h.

◆ siginfo_t

typedef struct siginfo siginfo_t

Definition at line 251 of file signal.h.

◆ sigset_t

typedef uint32_t sigset_t

Definition at line 214 of file signal.h.

Function Documentation

◆ kill()

int kill ( pid_t  pid,
int  sig 
)

send a signal to a process or a group of processes

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ raise()

int raise ( int  sig)

send a signal to the executing process

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

◆ sigaction()

int sigaction ( int  sig,
FAR const struct sigaction act,
FAR struct sigaction oact 
)

examine and change a signal action

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigaddset()

int sigaddset ( FAR sigset_t set,
int  signo 
)

add a signal to a signal set

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigdelset()

int sigdelset ( FAR sigset_t set,
int  signo 
)

delete a signal from a signal set

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigemptyset()

int sigemptyset ( FAR sigset_t set)

initialize and empty a signal set

#include <signal.h>
POSIX APIs (refer to : http://pubs.pengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigfillset()

int sigfillset ( FAR sigset_t set)

initialize and fill a signal set

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sighold()

int sighold ( int  sig)

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigignore()

int sigignore ( int  sig)

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

◆ sigismember()

int sigismember ( FAR const sigset_t set,
int  signo 
)

test for a signal in a signal set

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigpause()

int sigpause ( int  sig)

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

◆ sigpending()

int sigpending ( FAR sigset_t set)

examine pending signals

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigprocmask()

int sigprocmask ( int  how,
FAR const sigset_t set,
FAR sigset_t oset 
)

examine and change blocked signals

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigqueue()

int sigqueue ( int  pid,
int  signo,
union sigval  value 
)

queue a signal to a process

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigrelse()

int sigrelse ( int  sig)

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigsuspend()

int sigsuspend ( FAR const sigset_t sigmask)

wait for a signal

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigtimedwait()

int sigtimedwait ( FAR const sigset_t set,
FAR struct siginfo value,
FAR const struct timespec timeout 
)

wait for queued signals

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ sigwaitinfo()

int sigwaitinfo ( FAR const sigset_t set,
FAR struct siginfo value 
)

wait for queued signals

#include <signal.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

Variable Documentation

◆ signal

CODE void(*)(int sig) signal(int sig, CODE void(*func)(int sig))

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

Definition at line 392 of file signal.h.

◆ sigset

CODE void(*)(int sig) sigset(int sig, CODE void(*func)(int sig))

signal management

#include <signal.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

Definition at line 385 of file signal.h.