normal pthreads broken
Hi Gilles,
I think some regression slipped into the rt-pthread lib. This example no longer works on my box (thread is not executed):
#include <pthread.h>
#include <stdio.h>
#include <sys/mman.h>
void *thread(void *arg)
{
printf("thread\n");
return 0;
}main()
{
pthread_t thr;
mlockall(MCL_CURRENT|MCL_FUTURE);
printf("create = %d\n",
pthread_create(&thr, NULL, thread, NULL));
pause();
}This also explains why the cyclic test is broken.
Jan
Quoted 4 lines · Jan Kiszka
Hi Gilles,
I think some regression slipped into the rt-pthread lib. This example no longer works on my box (thread is not executed):
The issue is in src/skins/posix/thread.c. The trampoline does not even attempt to fire the thread body for policy == SCHED_OTHER. Will fix. This said, I still wonder why cyclic is affected, since it should only create SCHED_FIFO threads, but tracing it a bit, the issue is indeed the same one.
Quoted 31 lines
#include <
pthread.h>
#include <stdio.h>
#include <sys/mman.h>void *thread(void *arg)
{ printf("thread\n"); return 0; }
main(){ pthread_t thr; mlockall(MCL_CURRENT|MCL_FUTURE); printf("create = %d\n", pthread_create(&thr, NULL, thread, NULL)); pause(); }This also explains why the cyclic test is broken.
Jan
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 10 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka
Hi Gilles,
I think some regression slipped into the rt-pthread lib. This example no longer works on my box (thread is not executed):
The issue is in
src/skins/posix/thread.c. The trampoline does not even attempt to fire the thread body for policy ==SCHED_OTHER. Will fix. This said, I still wonder why cyclic is affected, since it should only createSCHED_FIFOthreads,
Oops, wrong. It first creates normal threads, then calls setschedparam to move them to the FIFO policy. So that's ok.
Quoted 34 lines
but tracing it a bit, the issue is indeed the
same one.Quoted 31 lines
#include <
pthread.h>
#include <stdio.h>
#include <sys/mman.h>void *thread(void *arg)
{ printf("thread\n"); return 0; }
main(){ pthread_t thr; mlockall(MCL_CURRENT|MCL_FUTURE); printf("create = %d\n", pthread_create(&thr, NULL, thread, NULL)); pause(); }This also explains why the cyclic test is broken.
Jan
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 11 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka
Hi Gilles,
I think some regression slipped into the rt-pthread lib. This example no longer works on my box (thread is not executed):
The issue is in
src/skins/posix/thread.c. The trampoline does not even attempt to fire the thread body for policy ==SCHED_OTHER. Will fix. This said, I still wonder why cyclic is affected, since it should only createSCHED_FIFOthreads, but tracing it a bit, the issue is indeed the same one.
It creates normal threads and then calls ppthread_setschedparam.
Quoted 31 lines
Quoted 31 lines
#include <
pthread.h>
#include <stdio.h>
#include <sys/mman.h>void *thread(void *arg)
{ printf("thread\n"); return 0; }
main(){ pthread_t thr; mlockall(MCL_CURRENT|MCL_FUTURE); printf("create = %d\n", pthread_create(&thr, NULL, thread, NULL)); pause(); }This also explains why the cyclic test is broken.
Jan
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core