rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Additional CondVar methods needed by Rust Binder
@ 2024-01-08 14:49 Alice Ryhl
  2024-01-08 14:49 ` [PATCH v4 1/4] rust: sync: add `CondVar::notify_sync` Alice Ryhl
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Alice Ryhl @ 2024-01-08 14:49 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Peter Zijlstra, Ingo Molnar, Will Deacon, Waiman Long, Tiago Lam,
	Thomas Gleixner
  Cc: Martin Rodriguez Reboredo, rust-for-linux, linux-kernel,
	Alice Ryhl

This patchset contains some CondVar methods that Rust Binder needs.

The CondVar type implements a condition variable, and tries to mirror
the API of the CondVar type provided by the Rust standard library [2].
It is implemented using a `wait_queue_head`.

Please see the Rust Binder RFC for usage examples [1].

Users of rust: sync: add `CondVar::notify_sync`:
	[PATCH RFC 04/20] rust_binder: add work lists
	[PATCH RFC 07/20] rust_binder: add epoll support
	[PATCH RFC 08/20] rust_binder: add non-oneway transactions

Users of rust: time: add msecs to jiffies conversion:
	[PATCH v2 3/3] rust: sync: add `CondVar::wait_timeout`
	[PATCH RFC 15/20] rust_binder: add process freezing

Users of rust: sync: add `CondVar::wait_timeout`:
	[PATCH RFC 15/20] rust_binder: add process freezing

This patchset is based on top of the rust-6.8 tag.

Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/ [1]
Link: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html [2]
Link: https://lore.kernel.org/all/20231214200421.690629-1-boqun.feng@gmail.com/ [3]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Changes in v4:
- Fix imports.
- Improve documentation for `notify_sync`.
- Add justification for using a jiffies-based `wait_timeout`.
- Link to v3: https://lore.kernel.org/r/20240104-rb-new-condvar-methods-v3-0-70b514fcbe52@google.com

Changes in v3:
- Update module description for new `time` module.
- Move constants to `rust/kernel/task.rs`.
- Fix incorrect doc-comment on `CondVar::notify`.
- Rename c_long argument to `timeout_in_jiffies`.
- Link to v2: https://lore.kernel.org/r/20231216-rb-new-condvar-methods-v2-0-b05ab61e6d5b@google.com

Changes in v2:
- Introduce "rust: time: add msecs to jiffies conversion" patch.
- Introduce "rust: sync: update integer types in CondVar" patch.
- Merge wait_internal and wait_internal_timeout.
- Use new Jiffies type alias instead of u64.
- Update names to use _interruptable suffix (and base patchset on top of [3]).
- Link to v1: https://lore.kernel.org/r/20231206-rb-new-condvar-methods-v1-0-33a4cab7fdaa@google.com

---
Alice Ryhl (4):
      rust: sync: add `CondVar::notify_sync`
      rust: time: add msecs to jiffies conversion
      rust: sync: add `CondVar::wait_timeout`
      rust: sync: update integer types in CondVar

 rust/bindings/bindings_helper.h |  1 +
 rust/kernel/lib.rs              |  1 +
 rust/kernel/sync/condvar.rs     | 95 ++++++++++++++++++++++++++++++++---------
 rust/kernel/sync/lock.rs        |  4 +-
 rust/kernel/task.rs             | 18 +++++++-
 rust/kernel/time.rs             | 20 +++++++++
 6 files changed, 117 insertions(+), 22 deletions(-)
---
base-commit: 711cbfc717650532624ca9f56fbaf191bed56e67
change-id: 20231205-rb-new-condvar-methods-27ba95df5d41

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-29  9:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 14:49 [PATCH v4 0/4] Additional CondVar methods needed by Rust Binder Alice Ryhl
2024-01-08 14:49 ` [PATCH v4 1/4] rust: sync: add `CondVar::notify_sync` Alice Ryhl
2024-01-08 14:49 ` [PATCH v4 2/4] rust: time: add msecs to jiffies conversion Alice Ryhl
2024-01-08 14:49 ` [PATCH v4 3/4] rust: sync: add `CondVar::wait_timeout` Alice Ryhl
2024-01-10 10:01   ` Benno Lossin
2024-01-24 15:07   ` Alice Ryhl
2024-01-08 14:50 ` [PATCH v4 4/4] rust: sync: update integer types in CondVar Alice Ryhl
2024-01-28 20:04 ` [PATCH v4 0/4] Additional CondVar methods needed by Rust Binder Miguel Ojeda
2024-01-29  9:13   ` Alice Ryhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).