c - pthread_create returns EAGAIN when the main thread is set sched_deadline scheduling policy -
i allow process scheduled under new linux sched_deadline scheduling policy. meanwhile, proecess has create worker threads other work. however, when called pthread_create after successful phone call of sched_setattr(which set process scheduling policy), got eagain. know might little unusual create thread in realtime process. problems such "what scheduling policy of new thread be" may arise.
despite of , there way create new thread in sched_deadline process?
and how define scheduling policy of new thread?
the code reproduce problem can found @
https://github.com/lookflying/pthread_deadline/
i think find default scheduling policy new pthread pthread_inherit_sched. override need pthread_attr_init() explicit set of attributes, futz pthread_attr_setschedpolicy() , pthread_attr_setschedparam(), , apply attributes in pthread_create().
you sched_getscheduler() , sched_getparam() before setting process sched_deadline , feed pthread_attr utilize later.
c linux pthreads real-time sched-deadline
No comments:
Post a Comment