Skip to content

Commit a570b37

Browse files
committed
zephyr: Fix some broken doc comments
Ensure that the links actually resolve correctly, eliminating all of the warnings from a doc build. Signed-off-by: David Brown <[email protected]>
1 parent bb89adb commit a570b37

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

zephyr/src/printk.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ macro_rules! printk {
3131
/// Print to Zephyr's console, with a newline.
3232
///
3333
/// This macro uses the same syntax as std's
34-
/// [`format!`], but writes to the Zephyr console
35-
/// instead. See `std::fmt` for more information.
34+
/// [`format!`](https://doc.rust-lang.org/stable/std/fmt/index.html), but writes to the Zephyr
35+
/// console instead.
3636
///
3737
/// If `CONFIG_PRINTK_SYNC` is enabled, this locks during printing. However, to avoid allocation,
3838
/// and due to private accessors in the Zephyr printk implementation, the lock is only over groups

zephyr/src/sys/thread.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@
1818
//! }
1919
//! ```
2020
//!
21-
//! Each of these has a `.take(...)` method that returns the single usable instance. The
21+
//! Each of these has a [`init_once`] method that returns the single usable instance. The
2222
//! StaticThread takes the stack retrieved by take as its argument. This will return a
2323
//! ThreadStarter, where various options can be set on the thread, and then it started with one of
2424
//! `spawn`, or `simple_spawn` (spawn requires `CONFIG_RUST_ALLOC`).
2525
//!
2626
//! Provided that `CONFIG_RUST_ALLOC` has been enabled (recommended): the read can be initialized as
2727
//! follows:
2828
//! ```
29-
//! let mut thread = MY_THREAD.take(MY_THREAD_STACK.take().unwrap()).unwrap();
29+
//! let mut thread = MY_THREAD.init_once(MY_THREAD_STACK.init_once(()).unwrap()).unwrap();
3030
//! thread.set_priority(5);
3131
//! let child = thread.spawn(|| move {
3232
//! // thread code...
3333
//! });
3434
//! ```
35+
//!
36+
//! [`init_once`]: StaticKernelObject::init_once
3537
3638
#[cfg(CONFIG_RUST_ALLOC)]
3739
extern crate alloc;

0 commit comments

Comments
 (0)