ksupport: fix dma cslice (ffi)

This commit is contained in:
occheung 2021-09-02 14:18:22 +08:00
parent c812a837ab
commit c6ba0f3cf4

View File

@ -248,7 +248,7 @@ fn dma_record_flush() {
} }
#[unwind(allowed)] #[unwind(allowed)]
extern fn dma_record_start(name: CSlice<u8>) { extern fn dma_record_start(name: &CSlice<u8>) {
let name = str::from_utf8(name.as_ref()).unwrap(); let name = str::from_utf8(name.as_ref()).unwrap();
unsafe { unsafe {
@ -360,7 +360,7 @@ extern fn dma_record_output_wide(target: i32, words: CSlice<i32>) {
} }
#[unwind(aborts)] #[unwind(aborts)]
extern fn dma_erase(name: CSlice<u8>) { extern fn dma_erase(name: &CSlice<u8>) {
let name = str::from_utf8(name.as_ref()).unwrap(); let name = str::from_utf8(name.as_ref()).unwrap();
send(&DmaEraseRequest { name: name }); send(&DmaEraseRequest { name: name });
@ -373,7 +373,7 @@ struct DmaTrace {
} }
#[unwind(allowed)] #[unwind(allowed)]
extern fn dma_retrieve(name: CSlice<u8>) -> DmaTrace { extern fn dma_retrieve(name: &CSlice<u8>) -> DmaTrace {
let name = str::from_utf8(name.as_ref()).unwrap(); let name = str::from_utf8(name.as_ref()).unwrap();
send(&DmaRetrieveRequest { name: name }); send(&DmaRetrieveRequest { name: name });