Skip to content
  • Philippe Gerum's avatar
    drivers/evl: hectic: allow userland to init wait mode · 1e413cc6
    Philippe Gerum authored
    
    
    The hectic utility needs to tell us whether some rtus/rtup/rtuo
    threads are about to start waiting for an out-of-band event, so that
    they don't miss a signal from the sleeper/switcher.
    
    This information is now passed at UTASK registration time, which
    ensures that HECTIC_OOB_WAIT is present in the task base flags early
    enough before a SWITCH_TO request may target them.
    
    Otherwise, the first evl_raise_flag() might be skipped in absence of
    HECTIC_OOB_WAIT in the base flags of the target task, when the
    sleeper/switcher manages to issue SWITCH_TO before such task enter the
    PEND routine, which was seen at several occasions on very slow
    platforms with 4+ CPUs (e.g. kvm-less qemu).
    
    A typical test case involved running the following commands in
    parallel on a 4-way configuration:
    
    $ latmus
    $ hectic rtuo2 rtuo3
    
    In that case, tasks on CPU3 would miss the initial signal from the
    sleeper/switcher.
    
    Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
    1e413cc6