Skip to content

Commit 2768b8b

Browse files
committed
zephyr: sys: sync: Semaphore: Remove alloc dependency
As Semaphores no longer use alloc, remove the conditional compliation dependency on `RUST_ALLOC`. Signed-off-by: David Brown <[email protected]>
1 parent e1fc1c2 commit 2768b8b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

zephyr/src/sys/sync/semaphore.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use core::ffi::c_uint;
1515
use core::fmt;
1616

1717
use crate::object::{ObjectInit, ZephyrObject};
18-
#[cfg(CONFIG_RUST_ALLOC)]
1918
use crate::{
2019
error::{to_result_void, Result},
2120
raw::{k_sem, k_sem_count_get, k_sem_give, k_sem_init, k_sem_reset, k_sem_take},
@@ -41,7 +40,6 @@ impl Semaphore {
4140
///
4241
/// Note that this API has changed, and it now doesn't return a Result, since the Result time
4342
/// generally doesn't work (in stable rust) with const.
44-
#[cfg(CONFIG_RUST_ALLOC)]
4543
pub const fn new(initial_count: c_uint, limit: c_uint) -> Semaphore {
4644
// Due to delayed init, we need to replicate the object checks in the C `k_sem_init`.
4745

0 commit comments

Comments
 (0)