On 22.07.21 16:15, Jan Kiszka via Xenomai wrote: > On 22.07.21 14:07, MONTET Julien wrote: >> Hi, >> >> I tested all of your patches last week, and it did not change anything. >> Compiling the Xenomai libraries directly on Docker didn't solve the issue. >> >> The Xenomai timer seems to work, I can loop on it and print the time >> (but it was also working before). >> >> Unfortunately I am still stuck on rt_task_wait_period(...). >> > > That might be becaues I was looking at Marco's test case so as he shared > his... > > I starred at the code again, and this on top may help (and also fix > signaling by udd): > > diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c > index 2f3ea1dec4..6a79fecb5c 100644 > --- a/kernel/cobalt/posix/thread.c > +++ b/kernel/cobalt/posix/thread.c > @@ -176,11 +176,11 @@ struct cobalt_thread *cobalt_thread_find(pid_t pid) /* > nklocked, IRQs off */ > } > EXPORT_SYMBOL_GPL(cobalt_thread_find); > > -struct cobalt_thread *cobalt_thread_find_local(pid_t pid) /* nklocked, IRQs > off */ > +struct cobalt_thread *cobalt_thread_find_local(pid_t vpid) /* nklocked, IRQs > off */ > { > struct cobalt_thread *thread; > > - thread = cobalt_thread_find(pid); > + thread = cobalt_thread_find(cobalt_vpid2pid_nr(vpid)); > if (thread == NULL || thread->hkey.mm != current->mm) > return NULL; > > diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h > index 51be372a7a..66e3a88223 100644 > --- a/kernel/cobalt/posix/thread.h > +++ b/kernel/cobalt/posix/thread.h > @@ -146,7 +146,7 @@ int cobalt_thread_setschedprio(unsigned long pth, > > struct cobalt_thread *cobalt_thread_find(pid_t pid); > > -struct cobalt_thread *cobalt_thread_find_local(pid_t pid); > +struct cobalt_thread *cobalt_thread_find_local(pid_t vpid); > > struct cobalt_thread *cobalt_thread_lookup(unsigned long pth); >
Did you have a chance to test this? It's now also part of next. I'll send out v3 for reference as well. > >> In any case, I will keep you informed if I achieve to implement this or >> find my issue. >> Do not hesitate to suggest debugging tools/methods, I will be pleased to >> give you feedback on the results. >> > > BTW, there is the bad news that threadobj_stat() uses /proc to retrieve > thread statistics. That will remain broken over pid namespaces until we > virtualize /proc as well. That affects rt_task_inquire and the registry > service /wrt tasks. > Checked again: threadobj_stat really only uses regular /proc/<pid>/stat, and that is virtualized by the kernel. However, the registry daemon does use /proc/xenomai/sched/threads. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux