Compare commits

..

1 Commits

Author SHA1 Message Date
mwojcik e3d7c3bfe9 subkernel: separate tags and data 2023-10-18 11:56:38 +08:00
2 changed files with 5 additions and 27 deletions

View File

@ -175,12 +175,7 @@ where
}
}
pub fn recv_return<'a, F, R>(
reader: &mut R,
tag_bytes: &'a [u8],
data: *mut (),
alloc: &mut F,
) -> Result<&'a [u8], Error>
pub fn recv_return<'a, F, R>(reader: &mut R, tag_bytes: &'a [u8], data: *mut (), alloc: &mut F) -> Result<&'a [u8], Error>
where
F: FnMut(usize) -> *mut (),
R: Read + ?Sized,
@ -195,16 +190,8 @@ where
Ok(it.data)
}
unsafe fn send_elements<W>(
writer: &mut W,
elt_tag: Tag,
length: usize,
data: *const (),
write_tags: bool,
) -> Result<(), Error>
where
W: Write + ?Sized,
{
unsafe fn send_elements<W>(writer: &mut W, elt_tag: Tag, length: usize, data: *const (), write_tags: bool) -> Result<(), Error>
where W: Write + ?Sized {
if write_tags {
writer.write_u8(elt_tag.as_u8())?;
}
@ -331,16 +318,8 @@ where W: Write + ?Sized {
}
}
pub fn send_args<W>(
writer: &mut W,
service: u32,
tag_bytes: &[u8],
data: *const *const (),
write_tags: bool,
) -> Result<(), Error>
where
W: Write + ?Sized,
{
pub fn send_args<W>(writer: &mut W, service: u32, tag_bytes: &[u8], data: *const *const (), write_tags: bool) -> Result<(), Error>
where W: Write + ?Sized {
let (arg_tags_bytes, return_tag_bytes) = split_tag(tag_bytes);
let mut args_it = TagIterator::new(arg_tags_bytes);

View File

@ -62,7 +62,6 @@ mod grabber {
use libasync::delay;
use libboard_artiq::grabber;
use libboard_zynq::time::Milliseconds;
use crate::GlobalTimer;
pub async fn grabber_thread(timer: GlobalTimer) {
let mut countdown = timer.countdown();