Module: xenomai-forge
Branch: next
Commit: 5afe470351f6b728f28ff3ecb882c82ec4afb349
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=5afe470351f6b728f28ff3ecb882c82ec4afb349

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           |   11 ++++-------
 2 files changed, 6 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..cb10beb 100644
--- a/lib/copperplate/notifier.c
+++ b/lib/copperplate/notifier.c
@@ -27,9 +27,6 @@
 #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 +109,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 +130,7 @@ static void lock_notifier_list(sigset_t *oset)
 
        read_lock(&notifier_lock);
        pthread_sigmask(SIG_BLOCK, NULL, &set);
-       sigaddset(&set, NOTIFYSIG);
+       sigaddset(&set, SIGNOTIFY);
        pthread_sigmask(SIG_BLOCK, &set, oset);
 }
 
@@ -184,7 +181,7 @@ int notifier_init(struct notifier *nf,
        pop_cleanup_lock(&notifier_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 +336,5 @@ void notifier_pkg_init(void)
        memset(&sa, 0, sizeof(sa));
        sa.sa_sigaction = &notifier_sighandler;
        sa.sa_flags = SA_SIGINFO|SA_RESTART;
-       sigaction(NOTIFYSIG, &sa, &notifier_old_sa);
+       sigaction(SIGNOTIFY, &sa, &notifier_old_sa);
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to