Module: xenomai-jki
Branch: for-upstream
Commit: a9aa9557f1df4f515791f42b8cf7bb301b31365a
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a9aa9557f1df4f515791f42b8cf7bb301b31365a

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Apr 23 14:32:01 2013 +0200

Remove mlockall alert handler

The probability of such errors is negligible now because we lock
unconditionally. So we can remove the machinery that used to report such
bugs to the user. The nucleus will still raise a signal if userspace
willingly unlocked the memory - it will get what it deserves (an
untranslated signal).

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-generic/bind.h |   10 ----------
 src/skins/common/bind.c    |   18 ------------------
 2 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/include/asm-generic/bind.h b/include/asm-generic/bind.h
index 57de2cf..e002982 100644
--- a/include/asm-generic/bind.h
+++ b/include/asm-generic/bind.h
@@ -5,10 +5,6 @@
 #include <stdlib.h>
 #include <signal.h>
 
-extern struct sigaction xeno_orig_sigdebug_sa;
-
-void xeno_handle_mlock_alert(int sig, siginfo_t *si, void *context);
-
 int 
 xeno_bind_skin_opt(unsigned skin_magic, const char *skin, const char *module);
 
@@ -16,7 +12,6 @@ static inline int
 xeno_bind_skin(unsigned skin_magic, const char *skin, const char *module)
 {
        int muxid = xeno_bind_skin_opt(skin_magic, skin, module);
-       struct sigaction sa;
 
        if (muxid == -1) {
                fprintf(stderr,
@@ -25,11 +20,6 @@ xeno_bind_skin(unsigned skin_magic, const char *skin, const 
char *module)
                exit(EXIT_FAILURE);
        }
 
-       sa.sa_sigaction = xeno_handle_mlock_alert;
-       sigemptyset(&sa.sa_mask);
-       sa.sa_flags = SA_SIGINFO;
-       sigaction(SIGXCPU, &sa, &xeno_orig_sigdebug_sa);
-
        return muxid;
 }
 
diff --git a/src/skins/common/bind.c b/src/skins/common/bind.c
index aeef861..a8ba75a 100644
--- a/src/skins/common/bind.c
+++ b/src/skins/common/bind.c
@@ -14,7 +14,6 @@
 #include <asm/xenomai/bits/bind.h>
 #include "sem_heap.h"
 
-struct sigaction xeno_orig_sigdebug_sa;
 static pthread_t xeno_main_tid;
 
 static void xeno_sigill_handler(int sig)
@@ -120,20 +119,3 @@ void xeno_fault_stack(void)
                stk[0] = stk[sizeof(stk) - 1] = 0xA5;
        }
 }
-
-void xeno_handle_mlock_alert(int sig, siginfo_t *si, void *context)
-{
-       if (si->si_value.sival_int == SIGDEBUG_NOMLOCK) {
-               fprintf(stderr, "Xenomai: process memory not locked "
-                       "(missing mlockall?)\n");
-               fflush(stderr);
-               exit(4);
-       }
-
-       /* XNTRAPSW was set for the thread but no user-defined handler
-          has been set to override our internal handler, so let's
-          restore the setting before we registered and re-raise the
-          signal. Usually triggers the default signal action. */
-       sigaction(SIGXCPU, &xeno_orig_sigdebug_sa, NULL);
-       pthread_kill(pthread_self(), SIGXCPU);
-}


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

Reply via email to