Module: xenomai-forge
Branch: master
Commit: 06458a35b78ce1f09afa78282ecb091fcc132d95
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=06458a35b78ce1f09afa78282ecb091fcc132d95

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Dec 11 16:12:15 2011 +0100

copperplate/init: make --no-mlock a nop over Cobalt

---

 README                 |    4 ++++
 lib/copperplate/init.c |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/README b/README
index af92b3d..5038452 100644
--- a/README
+++ b/README
@@ -274,6 +274,10 @@ command line, namely:
        the Xenomai core as part of the emulator initialization
        duties.
 
+       This flag only applies to the Mercury core. Memory must be
+       locked when invoking dual kernel services, therefore this
+       switch is a nop over Cobalt.
+
 --registry-mountpt=<path>
 
        Tells the emulator to mount the object registry over the given
diff --git a/lib/copperplate/init.c b/lib/copperplate/init.c
index f1acc7e..81e103e 100644
--- a/lib/copperplate/init.c
+++ b/lib/copperplate/init.c
@@ -123,7 +123,7 @@ static void usage(void)
 
         fprintf(stderr, "usage: program <options>, where options may be:\n");
         fprintf(stderr, "--mem-pool-size=<sizeK>          size of the main 
heap (kbytes)\n");
-        fprintf(stderr, "--no-mlock                       do not lock memory 
at init\n");
+        fprintf(stderr, "--no-mlock                       do not lock memory 
at init (Mercury only)\n");
         fprintf(stderr, "--registry-mountpt=<path>        mount point of 
registry\n");
         fprintf(stderr, "--no-registry                    suppress object 
registration\n");
         fprintf(stderr, "--session=<label>                label of shared 
multi-processing session\n");
@@ -501,6 +501,7 @@ void copperplate_init(int *argcp, char *const **argvp)
                goto fail;
        }
 
+#ifdef CONFIG_XENO_MERCURY
        if (__node_info.no_mlock == 0) {
                ret = mlockall(MCL_CURRENT | MCL_FUTURE);
                if (ret) {
@@ -509,6 +510,7 @@ void copperplate_init(int *argcp, char *const **argvp)
                        goto fail;
                }
        }
+#endif
 
        /*
         * Now that we have bootstrapped the core, we may call the


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to