Loading...
Searching...
No Matches
signal.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
#define OSMO_SIGNAL_SS_APPS 0
#define OSMO_SIGNAL_SS_RESERVED 2147483648u
enum {
SS_L_GLOBAL = OSMO_SIGNAL_SS_RESERVED,
SS_L_INPUT,
SS_L_NS,
SS_L_VTY,
};
/* application-defined signal types. */
#define OSMO_SIGNAL_T_APPS 0
#define OSMO_SIGNAL_T_RESERVED 2147483648u
enum {
S_L_GLOBAL_SHUTDOWN = OSMO_SIGNAL_T_RESERVED,
};
typedef int osmo_signal_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data);
/* Management */
void *osmo_signal_talloc_ctx_init(void *root_ctx);
int osmo_signal_register_handler(unsigned int subsys, osmo_signal_cbfn *cbfn, void *data);
void osmo_signal_unregister_handler(unsigned int subsys, osmo_signal_cbfn *cbfn, void *data);
/* Dispatch */
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data);
OSMO_SIGNAL_T_RESERVED
#define OSMO_SIGNAL_T_RESERVED
Definition signal.h:25
osmo_signal_register_handler
int osmo_signal_register_handler(unsigned int subsys, osmo_signal_cbfn *cbfn, void *data)
Register a new signal handler.
Definition signal.c:62
osmo_signal_unregister_handler
void osmo_signal_unregister_handler(unsigned int subsys, osmo_signal_cbfn *cbfn, void *data)
Unregister signal handler.
Definition signal.c:87
osmo_signal_dispatch
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data)
dispatch (deliver) a new signal to all registered handlers
Definition signal.c:107
osmo_signal_talloc_ctx_init
void * osmo_signal_talloc_ctx_init(void *root_ctx)
Initialize a signal_handler talloc context for osmo_signal_register_handler.
Definition signal.c:51
osmo_signal_cbfn
int osmo_signal_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data)
signal callback function type
Definition signal.h:33
OSMO_SIGNAL_SS_RESERVED
#define OSMO_SIGNAL_SS_RESERVED
Definition signal.h:13
SS_L_INPUT
@ SS_L_INPUT
Definition signal.h:18
SS_L_GLOBAL
@ SS_L_GLOBAL
Definition signal.h:17
SS_L_VTY
@ SS_L_VTY
Definition signal.h:20
SS_L_NS
@ SS_L_NS
Definition signal.h:19
S_L_GLOBAL_SHUTDOWN
@ S_L_GLOBAL_SHUTDOWN
Definition signal.h:29
data
uint8_t data[0]
subsys
char subsys[16]
logging sub-system
Definition gsmtap.h:9