aboutsummaryrefslogtreecommitdiffstats
path: root/rust/pin-init/examples/mutex.rs
Commit message (Collapse)AuthorAgeFilesLines
* rust: pin-init: examples, tests: add conditional compilation in order to ↵Benno Lossin2025-06-111-41/+56
| | | | | | | | | | | | | compile under any feature combination In the CI, all examples & tests should be run under all feature combinations. Currently several examples & tests use `std` without conditionally enabling it. Thus make them all compile under any feature combination by conditionally disabling the code that uses e.g. `std`. Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/fdfb70efddbc711b4543c850ee38a2f5a8d17cb6 Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Benno Lossin <[email protected]>
* rust: pin-init: examples: conditionally enable `feature(lint_reasons)`Benno Lossin2025-04-211-0/+1
| | | | | | | | | | `lint_reasons` is unstable in Rust 1.80 and earlier, enable it conditionally in the examples to allow compiling them with older compilers. Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/ec494fe686b0a97d5b59b5be5a42d3858038ea6a Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Benno Lossin <[email protected]>
* rust: pin-init: change examples to the user-space versionBenno Lossin2025-03-161-0/+209
Replace the examples in the documentation by the ones from the user-space version and introduce the standalone examples from the user-space version such as the `CMutex<T>` type. The `CMutex<T>` example from the pinned-init repository [1] is used in several documentation examples in the user-space version instead of the kernel `Mutex<T>` type (as it's not available). In order to split off the pin-init crate, all examples need to be free of kernel-specific types. Link: https://github.com/rust-for-Linux/pinned-init [1] Signed-off-by: Benno Lossin <[email protected]> Reviewed-by: Fiona Behrens <[email protected]> Tested-by: Andreas Hindborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>