(no subject)
Quoted 70 lines · Franz Engel
Philippe wrote
Quoted 69 lines
Quoted 12 lines · Philippe
Quoted 12 lines
Franz Engel wrote:
Hi,I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedI know that the error comes from the
assert_nrt_inner(void)function inside theassert_context.cfile. But I have no idea what is the reason. The Operation not permitted is the return value fromXENOMAI_SYSCALL1(__xn_sys_current_info, &info);. But I found no documentation about this function.Quoted 5 lines
This is reminiscent of a symptom observed for a bug fixed in the -forge tree, a while ago:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=014898add6a697e1a0d69f9e20b910ade74f1940Do you happen to call
fork()in your application?Yes, I do. What I can do to solve the problem. Should I try to modify the xenomai files as discrept in the git-link?
Quoted 3 lines
I'm unsure, although this would be possible to backport portions of the logic, the implementation has now diverged significantly between the 2.x and 3.x code bases.
>
Quoted 30 lines
Could you try the patch below? It's untested, but should work around the
root issue in your case:diff --git
a/include/nucleus/compiler.hb/include/nucleus/compiler.hindex 30f32c7..da4ea03 100644
---a/include/nucleus/compiler.h
+++b/include/nucleus/compiler.h
@@ -37,9 +37,11 @@#ifdef
__IN_XENO__
#if__GNUC__== 4 &&__GNUC_MINOR__== 6
-#define__constructor____attribute__((constructor, noclone))+#define__constructor____attribute__((constructor(200), noclone))+#define__late_constructor____attribute__((constructor, noclone))#else /* Gcc not 4.6 */
-#define__constructor____attribute__((constructor)) +#define__constructor____attribute__((constructor(200))) +#define__late_constructor____attribute__((constructor)) #endif /* Gcc not 4.6 */
#endif /* In xenomai */diff --git
a/src/skins/common/rt_print.cb/src/skins/common/rt_print.cindex dfa8b33..e056cd6 100644
---a/src/skins/common/rt_print.c
+++b/src/skins/common/rt_print.c
@@ -738,7 +738,7 @@ static voidforked_child_init(void)spawn_printer_thread();
}Quoted 8 lines
-static
__constructor__void__rt_print_init(void)+static__late_constructor__void__rt_print_init(void){
const char*value_str;
unsigned long long period;--
Philippe.I tried the patch. But I think it is not the correct version of xenomai. In my
compiler.hthere is no line "#define__constructor____attribute__((constructor, noclone))". I use Xenomai 2.6.2.1.
Quoted 1 line
Simply ignore the noclone spec when applying the patch manually. You should end up with the >normal/high priority ctor at priority 200, the late one with an implicit, unspecified low priority.
I'm not sure if I understand you correct. I change the function in rt_print.h (line 706) from "static __attribute__((constructor)) void __rt_print_init(void)" to "static __late_constructor__ void __rt_print_init(void)" and I insert the following lines into the compiler.h (absolutly new lines):
#ifdef __IN_XENO__
#if __GNUC__ == 4 && __GNUC_MINOR__ == 6
#define __constructor__ __attribute__((constructor(200), noclone))
#define __late_constructor__ __attribute__((constructor, noclone))
#else /* Gcc not 4.6 */
#define __constructor__ __attribute__((constructor(200)))
#define __late_constructor__ __attribute__((constructor))
#endif /* Gcc not 4.6 */
#endif /* In xenomai */
Is it correct? I have still the same failure.
regards,
Franz