rust: switch CondVar's timeout API to Delta
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | rust: time: add jiffies conversion helpers to Deltarust/ | +34 | 0 replies | |
| 2/2 | rust: sync: use Delta for CondVar timeout APIdrivers/ rust/ | +18 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] rust: switch CondVar's timeout API to Delta
From: FUJITA Tomonori <[email protected]>
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
Signature · 1 line
2.43.0