Re: [Xenomai-core] [BUG] normal pthreads broken
Philippe Gerum wrote: > On Thu, 2006-06-22 at 18:12 +0200, Jan Kiszka wrote: >> 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. It creates normal threads and then calls ppthread_setschedparam. > >> #include >> #include >> #include >> >> 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 >> Xenomai-core@gna.org >> https://mail.gna.org/listinfo/xenomai-core signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [BUG] normal pthreads broken
On Fri, 2006-06-23 at 10:50 +0200, Philippe Gerum wrote: > On Thu, 2006-06-22 at 18:12 +0200, Jan Kiszka wrote: > > 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, Oops, wrong. It first creates normal threads, then calls setschedparam to move them to the FIFO policy. So that's ok. > but tracing it a bit, the issue is indeed the > same one. > > > > > #include > > #include > > #include > > > > 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 > > Xenomai-core@gna.org > > https://mail.gna.org/listinfo/xenomai-core -- Philippe. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [BUG] normal pthreads broken
On Thu, 2006-06-22 at 18:12 +0200, Jan Kiszka wrote: > 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. > > #include > #include > #include > > 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 > Xenomai-core@gna.org > https://mail.gna.org/listinfo/xenomai-core -- Philippe. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [BUG] 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 #include #include 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 signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core