FROMGIT: rust: sync: condvar: Add wait_interruptible_freezable()
To support waiting for a `CondVar` as a freezable process, add a wait_interruptible_freezable() function. Binder needs this function in the appropriate places to freeze a process where some of its threads are blocked on the Binder driver. [Boqun: Capitalize the title and reword the commit log] Signed-off-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20250204-condvar-freeze-v2-1-804483096260@google.com Bug: 388786466 (cherry picked from commit 39dfd06783c0e256f420695ea85d95a5f471bc22 git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git lockdep-for-tip) Change-Id: I04c41d20868898a3371ebafa54e4afb76edc762e Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This commit is contained in:
@@ -23,6 +23,8 @@ pub const MAX_SCHEDULE_TIMEOUT: c_long = c_long::MAX;
|
||||
pub const TASK_INTERRUPTIBLE: c_int = bindings::TASK_INTERRUPTIBLE as c_int;
|
||||
/// Bitmask for tasks that are sleeping in an uninterruptible state.
|
||||
pub const TASK_UNINTERRUPTIBLE: c_int = bindings::TASK_UNINTERRUPTIBLE as c_int;
|
||||
/// Bitmask for tasks that are sleeping in a freezable state.
|
||||
pub const TASK_FREEZABLE: c_int = bindings::TASK_FREEZABLE as c_int;
|
||||
/// Convenience constant for waking up tasks regardless of whether they are in interruptible or
|
||||
/// uninterruptible sleep.
|
||||
pub const TASK_NORMAL: c_uint = bindings::TASK_NORMAL as c_uint;
|
||||
|
||||
Reference in New Issue
Block a user