[Xenomai-git] Philippe Gerum : lib/cobalt: lock memory upon deferred init too
Module: xenomai-3 Branch: master Commit: 8c636eda4b9806ea0a3098981bee714b8a870cbe URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8c636eda4b9806ea0a3098981bee714b8a870cbe Author: Philippe Gerum Date: Sat Feb 14 11:27:48 2015 +0100 lib/cobalt: lock memory upon deferred init too --- lib/cobalt/init.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index b7c8f76..b31d0d1 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -66,6 +66,11 @@ static void low_init(void) struct cobalt_featinfo *f; int ret; + if (mlockall(MCL_CURRENT | MCL_FUTURE)) { + report_error("mlockall: %s", strerror(errno)); + exit(EXIT_FAILURE); + } + old_sigill_handler = signal(SIGILL, sigill_handler); if (old_sigill_handler == SIG_ERR) { report_error("signal(SIGILL): %s", strerror(errno)); @@ -210,11 +215,6 @@ static __libcobalt_ctor void __init_cobalt(void) if (p && *p) return; - if (mlockall(MCL_CURRENT | MCL_FUTURE)) { - report_error("mlockall: %s", strerror(errno)); - exit(EXIT_FAILURE); - } - ret = __STD(pthread_getschedparam(ptid, &policy, &parm)); if (ret) { report_error("pthread_getschedparam: %s", strerror(ret)); ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : lib/cobalt: lock memory upon deferred init too
Module: xenomai-3 Branch: next Commit: 8c636eda4b9806ea0a3098981bee714b8a870cbe URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8c636eda4b9806ea0a3098981bee714b8a870cbe Author: Philippe Gerum Date: Sat Feb 14 11:27:48 2015 +0100 lib/cobalt: lock memory upon deferred init too --- lib/cobalt/init.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index b7c8f76..b31d0d1 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -66,6 +66,11 @@ static void low_init(void) struct cobalt_featinfo *f; int ret; + if (mlockall(MCL_CURRENT | MCL_FUTURE)) { + report_error("mlockall: %s", strerror(errno)); + exit(EXIT_FAILURE); + } + old_sigill_handler = signal(SIGILL, sigill_handler); if (old_sigill_handler == SIG_ERR) { report_error("signal(SIGILL): %s", strerror(errno)); @@ -210,11 +215,6 @@ static __libcobalt_ctor void __init_cobalt(void) if (p && *p) return; - if (mlockall(MCL_CURRENT | MCL_FUTURE)) { - report_error("mlockall: %s", strerror(errno)); - exit(EXIT_FAILURE); - } - ret = __STD(pthread_getschedparam(ptid, &policy, &parm)); if (ret) { report_error("pthread_getschedparam: %s", strerror(ret)); ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git