File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ impl Semaphore {
65
65
/// Take a semaphore.
66
66
///
67
67
/// Can be called from ISR if called with [`NoWait`].
68
+ ///
69
+ /// [`NoWait`]: crate::time::NoWait
68
70
pub fn take < T > ( & self , timeout : T ) -> Result < ( ) >
69
71
where T : Into < Timeout > ,
70
72
{
@@ -89,6 +91,8 @@ impl Semaphore {
89
91
///
90
92
/// This resets the count to zero. Any outstanding [`take`] calls will be aborted with
91
93
/// `Error(EAGAIN)`.
94
+ ///
95
+ /// [`take`]: Self::take
92
96
pub fn reset ( & mut self ) {
93
97
unsafe {
94
98
k_sem_reset ( self . item )
@@ -108,8 +112,10 @@ impl Semaphore {
108
112
/// A static Zephyr `k_sem`.
109
113
///
110
114
/// This is intended to be used from within the `kobj_define!` macro. It declares a static ksem
111
- /// that will be properly registered with the Zephyr kernel object system. Call [`take`] to get the
112
- /// [`Semaphore`] that is represents.
115
+ /// that will be properly registered with the Zephyr kernel object system. Call [`init_once`] to
116
+ /// get the [`Semaphore`] that is represents.
117
+ ///
118
+ /// [`init_once`]: StaticKernelObject::init_once
113
119
pub type StaticSemaphore = StaticKernelObject < k_sem > ;
114
120
115
121
unsafe impl Sync for StaticSemaphore { }
You can’t perform that action at this time.
0 commit comments