forked from M-Labs/artiq
firmware: fix compatibility with newer rustc. NFC.
This commit is contained in:
parent
6cbf8786d8
commit
b72178756e
|
@ -167,7 +167,7 @@ extern fn rpc_recv(slot: *mut ()) -> usize {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn terminate(exception: &eh::Exception, mut backtrace: &mut [usize]) -> ! {
|
fn terminate(exception: &eh::Exception, backtrace: &mut [usize]) -> ! {
|
||||||
let mut cursor = 0;
|
let mut cursor = 0;
|
||||||
for index in 0..backtrace.len() {
|
for index in 0..backtrace.len() {
|
||||||
if backtrace[index] > kernel_proto::KERNELCPU_PAYLOAD_ADDRESS {
|
if backtrace[index] > kernel_proto::KERNELCPU_PAYLOAD_ADDRESS {
|
||||||
|
@ -333,7 +333,7 @@ extern fn dma_record_output_wide(timestamp: i64, channel: i32, address: i32, wor
|
||||||
if DMA_RECORDER.buffer.len() - DMA_RECORDER.data_len < length {
|
if DMA_RECORDER.buffer.len() - DMA_RECORDER.data_len < length {
|
||||||
dma_record_flush()
|
dma_record_flush()
|
||||||
}
|
}
|
||||||
let mut dst = &mut DMA_RECORDER.buffer[DMA_RECORDER.data_len..
|
let dst = &mut DMA_RECORDER.buffer[DMA_RECORDER.data_len..
|
||||||
DMA_RECORDER.data_len + length];
|
DMA_RECORDER.data_len + length];
|
||||||
dst[..header_length].copy_from_slice(&header[..]);
|
dst[..header_length].copy_from_slice(&header[..]);
|
||||||
dst[header_length..].copy_from_slice(&data[..]);
|
dst[header_length..].copy_from_slice(&data[..]);
|
||||||
|
|
|
@ -10,9 +10,9 @@ mod imp {
|
||||||
|
|
||||||
mod lock {
|
mod lock {
|
||||||
use core::slice;
|
use core::slice;
|
||||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
use core::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||||
|
|
||||||
static LOCKED: AtomicUsize = AtomicUsize::new(0);
|
static LOCKED: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||||
|
|
||||||
pub struct Lock;
|
pub struct Lock;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue