forked from M-Labs/zynq-rs
Compare commits
No commits in common. "a116142f6346193f272528e68c09af5eda771c0d" and "a73df780d0d0e757738f27feac162904f5bf93f9" have entirely different histories.
a116142f63
...
a73df780d0
|
@ -12,7 +12,7 @@ pub struct Semaphore {
|
|||
}
|
||||
|
||||
impl Semaphore {
|
||||
pub const fn new(value: i32, max: i32) -> Self {
|
||||
pub fn new(value: i32, max: i32) -> Self {
|
||||
Semaphore { value: AtomicI32::new(value), max}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,7 @@ unsafe impl GlobalAlloc for CortexA9Alloc {
|
|||
}
|
||||
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
if cfg!(not(feature = "alloc_core"))
|
||||
|| ((&__heap0_start as *const usize as usize <= ptr as usize)
|
||||
&& ((ptr as usize) < &__heap0_end as *const usize as usize))
|
||||
{
|
||||
if cfg!(not(feature = "alloc_core")) || MPIDR.read().cpu_id() == 0 {
|
||||
&self.0
|
||||
} else {
|
||||
&self.1
|
||||
|
|
Loading…
Reference in New Issue