forked from M-Labs/zynq-rs
change const_fn feature
This commit is contained in:
parent
91607ea8e8
commit
2f6d416c21
|
@ -1,6 +1,5 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
#![feature(const_in_array_repeat_expressions)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#![no_std]
|
||||
#![feature(llvm_asm, global_asm)]
|
||||
#![feature(never_type)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(const_fn_trait_bound)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
|
|
|
@ -178,7 +178,8 @@ macro_rules! sync_channel {
|
|||
{
|
||||
use core::sync::atomic::{AtomicUsize, AtomicPtr};
|
||||
use $crate::sync_channel::{Sender, Receiver};
|
||||
static LIST: [AtomicPtr<$t>; $cap + 1] = [AtomicPtr::new(core::ptr::null_mut()); $cap + 1];
|
||||
const cnst_ptr: AtomicPtr<$t> = AtomicPtr::new(core::ptr::null_mut());
|
||||
static LIST: [AtomicPtr<$t>; $cap + 1] = [cnst_ptr; $cap + 1];
|
||||
static WRITE: AtomicUsize = AtomicUsize::new(0);
|
||||
static READ: AtomicUsize = AtomicUsize::new(0);
|
||||
(Sender::new(&LIST, &WRITE, &READ), Receiver::new(&LIST, &WRITE, &READ))
|
||||
|
|
Loading…
Reference in New Issue