Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v1 0/2] rust: switch CondVar's timeout API to Delta
@ 2026-07-04 13:25 FUJITA Tomonori
  2026-07-04 13:25 ` [PATCH v1 1/2] rust: time: add jiffies conversion helpers " FUJITA Tomonori
  2026-07-04 13:25 ` [PATCH v1 2/2] rust: sync: use Delta for CondVar timeout API FUJITA Tomonori
  0 siblings, 2 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2026-07-04 13:25 UTC (permalink / raw)
  To: a.hindborg, aliceryhl, arve, boqun, brauner, cmllamas, gary,
	gregkh, ojeda, tkjos
  Cc: acourbot, anna-maria, bjorn3_gh, dakr, daniel.almeida, frederic,
	jstultz, lossin, lyude, sboyd, tamird, tglx, tmgross, work,
	rust-for-linux, FUJITA Tomonori

From: FUJITA Tomonori <fujita.tomonori@gmail.com>

CondVar::wait_interruptible_timeout() currently takes and returns a
raw jiffies count (a plain c_ulong alias with no type safety). Callers
have to know on their own that the value meant jiffies and convert
to/from it themselves, which is easy to get wrong (e.g. passing a
millisecond value where a jiffies value is expected).

This series adds jiffies conversion helpers to Delta and then switches
CondVar's timeout API to use Delta instead of raw jiffies, updating
its only caller, binder's ioctl_freeze().

FUJITA Tomonori (2):
  rust: time: add jiffies conversion helpers to Delta
  rust: sync: use Delta for CondVar timeout API

 drivers/android/binder/process.rs | 12 +++++------
 rust/kernel/sync/condvar.rs       | 20 ++++++++++--------
 rust/kernel/time.rs               | 34 +++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 14 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.43.0


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

end of thread, other threads:[~2026-07-04 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04 13:25 [PATCH v1 0/2] rust: switch CondVar's timeout API to Delta FUJITA Tomonori
2026-07-04 13:25 ` [PATCH v1 1/2] rust: time: add jiffies conversion helpers " FUJITA Tomonori
2026-07-04 13:25 ` [PATCH v1 2/2] rust: sync: use Delta for CondVar timeout API FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox