On 10/06/2021 16:24, Gedare Bloom wrote:
5. Can anyone give some suggestions to solve the problem? thanks!
Classic and POSIX APIs can be mixed. It is a poorly documented benefit
of RTEMS. I think in this case, you should be able to use
pthread_setschedparam(...) with passing policy == SCHED_RR to get the
behavior you seek. You have to use posix priorities in the sched_param
argument. though, or else your thread will have its priority changed.
Pass the task_id instead of pthread_t as the first argument, and the
rest should work itself out. Do let us know if that works or it
doesn't work/you have more questions.

You can use these directives to convert priority values:

https://docs.rtems.org/branches/master/c-user/scheduling-concepts/directives.html#rtems-scheduler-map-priority-to-posix

In general, the timeslicing based on clock tick quantum is quite coarse. The internal timestamps would allow a much finer grained timeslicing. This could be added if someone is interested in a small project.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to