]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - signal.h
signal: Provide generic signal_pre_select().
[paraslash.git] / signal.h
index 526f15025c658f5f09b1388feba057addb848864..643c148f3d9ec528c6a78cbf290c8c8422c25d78 100644 (file)
--- a/signal.h
+++ b/signal.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2014 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -13,9 +13,15 @@ struct signal_task {
        /** The signal pipe. */
        int fd;
        /** The associated task structure. */
-       struct task task;
+       struct task *task;
 };
 
+_static_inline_ void signal_pre_select(struct sched *s, void *context)
+{
+       struct signal_task *st = context;
+       para_fd_set(st->fd, &s->rfds, &s->max_fileno);
+}
+
 int para_signal_init(void);
 void para_sigaction(int sig, void (*handler)(int));
 void para_install_sighandler(int);