|
46 | 46 | //! } |
47 | 47 | //! |
48 | 48 | //! let foo = pin_init!(Foo { |
49 | | -//! a <- new_mutex!(42, "Foo::a"), |
| 49 | +//! a <- Mutex::new_named(42, "Foo::a"), |
50 | 50 | //! b: 24, |
51 | 51 | //! }); |
52 | 52 | //! ``` |
|
65 | 65 | //! # b: u32, |
66 | 66 | //! # } |
67 | 67 | //! # let foo = pin_init!(Foo { |
68 | | -//! # a <- new_mutex!(42, "Foo::a"), |
| 68 | +//! # a <- Mutex::new_named(42, "Foo::a"), |
69 | 69 | //! # b: 24, |
70 | 70 | //! # }); |
71 | 71 | //! let foo: Result<Pin<KBox<Foo>>> = KBox::pin_init(foo, GFP_KERNEL); |
|
98 | 98 | //! impl DriverData { |
99 | 99 | //! fn new() -> impl PinInit<Self, Error> { |
100 | 100 | //! try_pin_init!(Self { |
101 | | -//! status <- new_mutex!(0, "DriverData::status"), |
| 101 | +//! status <- Mutex::new_named(0, "DriverData::status"), |
102 | 102 | //! buffer: KBox::init(kernel::init::zeroed(), GFP_KERNEL)?, |
103 | 103 | //! }) |
104 | 104 | //! } |
@@ -253,7 +253,7 @@ pub mod macros; |
253 | 253 | /// } |
254 | 254 | /// |
255 | 255 | /// stack_pin_init!(let foo = pin_init!(Foo { |
256 | | -/// a <- new_mutex!(42), |
| 256 | +/// a <- Mutex::new(42), |
257 | 257 | /// b: Bar { |
258 | 258 | /// x: 64, |
259 | 259 | /// }, |
@@ -313,7 +313,7 @@ macro_rules! stack_pin_init { |
313 | 313 | /// } |
314 | 314 | /// |
315 | 315 | /// stack_try_pin_init!(let foo: Result<Pin<&mut Foo>, AllocError> = pin_init!(Foo { |
316 | | -/// a <- new_mutex!(42), |
| 316 | +/// a <- Mutex::new(42), |
317 | 317 | /// b: KBox::new(Bar { |
318 | 318 | /// x: 64, |
319 | 319 | /// }, GFP_KERNEL)?, |
@@ -347,7 +347,7 @@ macro_rules! stack_pin_init { |
347 | 347 | /// } |
348 | 348 | /// |
349 | 349 | /// stack_try_pin_init!(let foo: Pin<&mut Foo> =? pin_init!(Foo { |
350 | | -/// a <- new_mutex!(42), |
| 350 | +/// a <- Mutex::new(42), |
351 | 351 | /// b: KBox::new(Bar { |
352 | 352 | /// x: 64, |
353 | 353 | /// }, GFP_KERNEL)?, |
|
0 commit comments