• Philippe Gerum's avatar
    evl/sched: bypass preemption check for blocked threads · 4ef68215
    Philippe Gerum authored
    
    
    evl_schedule() should not enforce preemption disabling, but rather
    leave this check to the inner __evl_schedule() handler which will
    ignore the preemption count if the current thread has to block.
    
    This way, we can use evl_schedule() as the general interface for
    kicking the rescheduling procedure, fixing the hack in
    blocked_thread_timed() which we needed since the former
    evl_suspend_thread() call was prevented from calling the scheduler
    implicitly.
    
    This set of changes preserves the ability to sleep with a non-zero
    preemption count, which is required in some occasions, e.g.:
    
    evl_disable_preempt();
    ...
    evl_wait_flag();
    ...
    evl_enable_preempt();
    Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
    4ef68215
thread.c 63.3 KB