All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_signals.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* le_sig_EventHandlerFunc_t )(int sigNum)
 

Functions

void le_sig_SetEventHandler (int sigNum, le_sig_EventHandlerFunc_t sigEventHandler)
 
void le_sig_DeleteAll (void)
 

Detailed Description

Legato Signals API include file.

Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.

Typedef Documentation

typedef void(* le_sig_EventHandlerFunc_t)(int sigNum)

Prototype for the signal event handler functions.

Function Documentation

void le_sig_DeleteAll ( void  )

Removes all signal event handlers for the calling thread and cleans up any resources used for signal events. This should be called before the thread exits.

void le_sig_SetEventHandler ( int  sigNum,
le_sig_EventHandlerFunc_t  sigEventHandler 
)

Sets a signal event handler for the calling thread. Each signal can only have a single event handler per thread. The most recent event handler set will be called when the signal is received. sigEventHandler can be set to NULL to remove a previously set handler.

Note
sigNum Cannot be SIGKILL or SIGSTOP or any program error signals: SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGIOT, SIGTRAP, SIGEMT, SIGSYS.
Does not return on failure.
Parameters
[in]sigNumSignal to set the event handler for. See parameter documentation in comments above.
[in]sigEventHandlerEvent handler to call when a signal is received.