le_signals.h
Go to the documentation of this file.
16 * When a signal is received, unless it is ignored or blocked the action for the signal will preempt17 * any code that is currently executing. Also, signals are asynchronous and may arrive at any time.56 * In this code sample, the signal handler is only used to set a flag, while the main loop handles59 * done after processing of the signal, any signals received during processing of the signals will65 * be used to receive and handle signals synchronously without the need for a sit-and-wait loop or71 * is called by the thread's Legato event loop (see @ref c_eventLoop for more details). The handler72 * is called synchronously in the context of the thread that set the handler. Be aware that if the73 * thread's event loop is not called or is blocked by some other code, the signal event handler will101 * @section c_signals_mixedHandlers Mixing Asynchronous Signal Handlers with Synchronous Signal Event Handlers103 * Signal events work well when dealing with signals synchronously, but when signals must be dealt111 * only if they do not deal with the same signals. In fact all signals that use signal events must112 * be blocked for every thread in the process. The Legato framework takes care of this for you when122 * the process are received by one of the threads in the process that has a handler for the signal.130 * Signals that are received but not yet handled are said to be pending. If another signal of the131 * same type is received while the first signal is pending, then the two signals will merge into a132 * single signal and there will be only one handler function call. Consequently, it is not possible136 * @warning Signals are difficult to deal with in general because of their asynchronous nature and137 * although, Legato has simplified the situation with signal events certain limitations still exist.142 * Signals that are to be used with a signal event handlers must be blocked for the entire process.193 //--------------------------------------------------------------------------------------------------205 //--------------------------------------------------------------------------------------------------209 //--------------------------------------------------------------------------------------------------211 (216 //--------------------------------------------------------------------------------------------------220 * Signals that an event handler will be set for must be blocked for all threads in the process. To226 //--------------------------------------------------------------------------------------------------233 //--------------------------------------------------------------------------------------------------244 //--------------------------------------------------------------------------------------------------254 //--------------------------------------------------------------------------------------------------259 //--------------------------------------------------------------------------------------------------266 //--------------------------------------------------------------------------------------------------271 //--------------------------------------------------------------------------------------------------void le_sig_DeleteAll(void)void le_sig_Block(int sigNum)void le_sig_InstallShowStackHandler(void)void le_sig_SetEventHandler(int sigNum, le_sig_EventHandlerFunc_t sigEventHandler)