Skip to content
  • Philippe Gerum's avatar
    cobalt/process: exit_thread handlers should reschedule as needed · 393ece85
    Philippe Gerum authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    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: default avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    393ece85