Module: xenomai-forge Branch: rtdm-api-waitqueues Commit: bdbd0dd1d6f0ea314fb15f621dad9e61a5691290 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=bdbd0dd1d6f0ea314fb15f621dad9e61a5691290
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Apr 15 16:57:43 2014 +0200 copperplate/notifier: rename notification signal to SIGNOTIFY --- include/mercury/boilerplate/signal.h | 4 ++-- lib/copperplate/notifier.c | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/mercury/boilerplate/signal.h b/include/mercury/boilerplate/signal.h index 69b1ff1..a09b3f9 100644 --- a/include/mercury/boilerplate/signal.h +++ b/include/mercury/boilerplate/signal.h @@ -24,7 +24,7 @@ #define sigev_notify_thread_id _sigev_un._tid #endif -/* Private signal used for unblocking from syscalls. */ -#define SIGRELS (SIGRTMIN + 9) +#define SIGNOTIFY (SIGRTMIN + 8) /* Internal notification */ +#define SIGRELS (SIGRTMIN + 9) /* Syscall abort */ #endif /* _MERCURY_COPPERPLATE_SIGNAL_H */ diff --git a/lib/copperplate/notifier.c b/lib/copperplate/notifier.c index e6d2ff4..c94998b 100644 --- a/lib/copperplate/notifier.c +++ b/lib/copperplate/notifier.c @@ -24,12 +24,10 @@ #include <errno.h> #include "copperplate/notifier.h" #include "boilerplate/lock.h" +#include "boilerplate/signal.h" #include "copperplate/debug.h" #include "internal.h" -/* Private signal used for notification. */ -#define NOTIFYSIG (SIGRTMIN + 8) - static DEFINE_PRIVATE_LIST(notifier_list); static pthread_mutex_t notifier_lock; @@ -112,7 +110,7 @@ hand_over: if (notifier_old_sa.sa_sigaction) { /* * This is our best effort to relay any unprocessed - * event to the user-defined handler for NOTIFYSIG we + * event to the user-defined handler for SIGNOTIFY we * might have overriden in notifier_pkg_init(). The * application code should set this handler prior to * calling copperplate_init(), so that we know about it. The @@ -133,7 +131,7 @@ static void lock_notifier_list(sigset_t *oset) read_lock(¬ifier_lock); pthread_sigmask(SIG_BLOCK, NULL, &set); - sigaddset(&set, NOTIFYSIG); + sigaddset(&set, SIGNOTIFY); pthread_sigmask(SIG_BLOCK, &set, oset); } @@ -184,7 +182,7 @@ int notifier_init(struct notifier *nf, pop_cleanup_lock(¬ifier_lock); fd = nf->psfd[0]; - fcntl(fd, F_SETSIG, NOTIFYSIG); + fcntl(fd, F_SETSIG, SIGNOTIFY); owner.type = F_OWNER_TID; owner.pid = nf->owner; fcntl(fd, F_SETOWN_EX, &owner); @@ -339,5 +337,5 @@ void notifier_pkg_init(void) memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = ¬ifier_sighandler; sa.sa_flags = SA_SIGINFO|SA_RESTART; - sigaction(NOTIFYSIG, &sa, ¬ifier_old_sa); + sigaction(SIGNOTIFY, &sa, ¬ifier_old_sa); } _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git