Hello dear all!

Suppose, we have the following pseudo code:

spin_lock(&some_lock);
some_func();
spin_unlock(&some_lock);

some_fun()
{
    .....
    wake_up_interruptibe_sync(&wait_queue);
    ....
}
Is this correct behavior or not?

This is a call chain:
wake_up_interruptible_sync ---> wake_up_sync ---> wake_up_common(...,
sync=1, ...) ---> ... ---> try_to_wake_up(..., sync=1)
try_to_wake_up invokes resched_task().
As a result, we invoke one thread, while other holds the lock.

Tell me please, my assumption is correct?

-- 
Regards,
Denis

Reply via email to