• Philippe Gerum's avatar
    cobalt/process: exit_thread handlers should reschedule as needed · 393ece85
    Philippe Gerum authored
    An exit_handler wants to be called from the root domain, with
    preemption enabled and hard irqs on in order to keep all options open,
    such as using regular sleeping locks.
    
    If such a handler updates the Cobalt scheduler state, it has to
    trigger the rescheduling procedure (xnsched_run()) internally as well,
    grouping the changes and the rescheduling call into the same
    interrupt-free section, in order to guard against CPU migration.
    
    Relying on the core to kick such procedure in order to commit pending
    changes later on is unreliable.
    Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
    393ece85
process.c 43.2 KB