Changeset 235:8773740401a5 in freeDiameter for include
- Timestamp:
- Mar 5, 2010, 7:01:48 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfreeDiameter.h
r232 r235 75 75 #include <libgen.h> /* for basename if --dbg_file is specified */ 76 76 #endif /* DEBUG */ 77 78 79 /*============================================================*/ 80 /* INIT */ 81 /*============================================================*/ 82 83 /* This function must be called first, before any call to another library function */ 84 /* If the parameter is not 0, the support for signals (fd_sig_register) is enabled, otherwise it is disabled */ 85 /* The function must be called while the application is single-threaded to enable support for signals */ 86 int fd_lib_init(int support_signals); 87 88 /* Call this one when the application terminates, to destroy internal threads */ 89 void fd_lib_fini(void); 90 91 92 77 93 78 94 /*============================================================*/ … … 559 575 560 576 /*============================================================*/ 577 /* SIGNALS */ 578 /*============================================================*/ 579 580 /* Register a new callback to be called on reception of a given signal (it receives the signal as parameter) */ 581 /* EALREADY will be returned if there is already a callback registered on this signal */ 582 /* NOTE: the signal handler will be called from a new detached thread */ 583 int fd_sig_register(int signal, char * modname, void (*callback)(int signal)); 584 585 /* Remove the handler for a given signal */ 586 int fd_sig_unregister(int signal); 587 588 /* Dump list of handlers */ 589 void fd_sig_dump(int level, int indent); 590 591 /* Name of signals */ 592 #ifdef HAVE_SIGNALENT_H 593 extern const char *const fd_sig_str[]; 594 extern const int fd_sig_nstr; 595 # define SIGNALSTR(sig) (((sig) < fd_sig_nstr) ? fd_sig_str[(sig)] : "[unknown signal]") 596 #else /* HAVE_SIGNALENT_H */ 597 # define SIGNALSTR(sig) ("[no sig names]") 598 #endif /* HAVE_SIGNALENT_H */ 599 600 601 /*============================================================*/ 561 602 /* LISTS */ 562 603 /*============================================================*/
Note: See TracChangeset
for help on using the changeset viewer.