summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-08-17 16:19:46 +0200
committerHarald Welte <laforge@gnumonks.org>2011-08-17 17:14:12 +0200
commitaf8e4352b5880a20cfdaf89303a71e222ab8badd (patch)
treeb1933332f6e4bca60057262404a1aaea855882e6 /src
parenteee3790d246600c9145f9b972e67ebfded8fde98 (diff)
doxygen: Add documentation to signal.[ch]
Diffstat (limited to 'src')
-rw-r--r--src/signal.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/signal.c b/src/signal.c
index bc339bb9..7ddc2e04 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -25,6 +25,12 @@
#include <string.h>
#include <errno.h>
+/*! \addtogroup signal
+ * @{
+ */
+/*! \file signal.c */
+
+
void *tall_sigh_ctx;
static LLIST_HEAD(signal_handler_list);
@@ -36,6 +42,11 @@ struct signal_handler {
};
+/*! \brief Register a new signal handler
+ * \param[in] subsys Subsystem number
+ * \param[in] cbfn Callback function
+ * \param[in] data Data passed through to callback
+ */
int osmo_signal_register_handler(unsigned int subsys,
osmo_signal_cbfn *cbfn, void *data)
{
@@ -58,6 +69,11 @@ int osmo_signal_register_handler(unsigned int subsys,
return 0;
}
+/*! \brief Unregister signal handler
+ * \param[in] subsys Subsystem number
+ * \param[in] cbfn Callback function
+ * \param[in] data Data passed through to callback
+ */
void osmo_signal_unregister_handler(unsigned int subsys,
osmo_signal_cbfn *cbfn, void *data)
{
@@ -73,7 +89,11 @@ void osmo_signal_unregister_handler(unsigned int subsys,
}
}
-
+/*! \brief dispatch (deliver) a new signal to all registered handlers
+ * \param[in] subsys Subsystem number
+ * \param[in] signal Signal number,
+ * \param[in] signal_data Data to be passed along to handlers
+ */
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal,
void *signal_data)
{
@@ -85,3 +105,5 @@ void osmo_signal_dispatch(unsigned int subsys, unsigned int signal,
(*handler->cbfn)(subsys, signal, handler->data, signal_data);
}
}
+
+/*! }@ */