diff options
author | Alice Ryhl <aliceryhl@google.com> | 2025-03-07 15:26:59 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-08 00:55:04 +0100 |
commit | 70b9c8563c9c29102a785d4822f0d77d33fee808 (patch) | |
tree | 910628e5d0d00c7fd373d30873e752324734f13a /rust/kernel/task.rs | |
parent | c2849afafd08a1c3ad881129de48ebe1642f7675 (diff) |
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: Cleaned up the changelog and documentation. ]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250307232717.1759087-10-boqun.feng@gmail.com
Diffstat (limited to 'rust/kernel/task.rs')
-rw-r--r-- | rust/kernel/task.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs index 07bc22a7645c..ea43a3b8d9c5 100644 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@ -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; |