]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
signal.h: Add documentation of signal_pre_select().
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 27 Dec 2016 01:01:55 +0000 (02:01 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 30 Dec 2016 14:23:22 +0000 (15:23 +0100)
It is a public function which should be annotated.

signal.h

index b5b06f356999062f3b9b233e8303eea33015804a..742f677a2568cad3001ae9cc2220344ebf7f8b1b 100644 (file)
--- a/signal.h
+++ b/signal.h
@@ -16,6 +16,22 @@ struct signal_task {
        struct task *task;
 };
 
        struct task *task;
 };
 
+/**
+ * A generic pre-select method for signal tasks.
+ *
+ * \param s Passed to para_fd_set().
+ * \param context Signal task pointer.
+ *
+ * This convenience helper is called from several programs which need to handle
+ * signals, including para_server and para_audiod. These programs define a
+ * signal task structure and set its ->pre_select method to this function which
+ * adds the file descriptor of the signal task to the set of descriptors to be
+ * watched in the next select() call.
+ *
+ * Although the second parameter must be in fact a pointer to a signal_task
+ * structure, the parameter is specified as void * here to match the
+ * ->pre_select method of struct task.
+ */
 _static_inline_ void signal_pre_select(struct sched *s, void *context)
 {
        struct signal_task *st = context;
 _static_inline_ void signal_pre_select(struct sched *s, void *context)
 {
        struct signal_task *st = context;