Skip to content

Support `likely`, `unlikely` and `cold_path`

Miguel Ojeda rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: prelude: use the "kernel vertical" imports stylerust/kernel/prelude.rs+88 -261 reply
2/2rust: std_vendor: add `{likely,unlikely,cold_path}()`init/Kconfig rust/kernel/lib.rs rust/kernel/prelude.rs +1 more+164 -05 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Support `likely`, `unlikely` and `cold_path`

Rust 1.95.0 stabilized the cold_path feature, which means that it is a good time to add the support for this pervasive feature in C.

The functions should work as expected for all Rust >= 1.84.0, which includes our future bumped Rust minimum version. For older versions, they are a no-op.

Miguel Ojeda (2):
rust: prelude: use the "kernel vertical" imports style
rust: std_vendor: add {likely,unlikely,cold_path}()

 init/Kconfig              |   6 ++
 rust/kernel/lib.rs        |   9 +++
 rust/kernel/prelude.rs    | 119 ++++++++++++++++++++++++-------
 rust/kernel/std_vendor.rs | 144 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 252 insertions(+), 26 deletions(-)

--
2.53.0