refactor: fix clippy warnings
This commit is contained in:
@@ -410,7 +410,7 @@ impl Process {
|
||||
let mut data_offset = 0usize;
|
||||
for arg in argv.iter() {
|
||||
// XXX this is really unsafe and I am not really sure ABI will stay like this XXX
|
||||
Self::write_paged(space, base + offset + 0, base + data_offset)?;
|
||||
Self::write_paged(space, base + offset, base + data_offset)?;
|
||||
Self::write_paged(space, base + offset + 8, arg.len())?;
|
||||
offset += 16;
|
||||
data_offset += arg.len();
|
||||
|
||||
@@ -237,6 +237,7 @@ impl Thread {
|
||||
|
||||
/// Changes process wait condition status
|
||||
pub fn setup_wait(&self, wait: *const Wait) {
|
||||
#![allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
let mut lock = self.inner.lock();
|
||||
// FIXME this is not cool
|
||||
lock.pending_wait = Some(unsafe { &*wait });
|
||||
|
||||
@@ -83,8 +83,12 @@ pub fn select(
|
||||
}
|
||||
let read = rfds.as_deref().map(FdSet::clone);
|
||||
let write = wfds.as_deref().map(FdSet::clone);
|
||||
rfds.as_deref_mut().map(FdSet::reset);
|
||||
wfds.as_deref_mut().map(FdSet::reset);
|
||||
if let Some(rfds) = &mut rfds {
|
||||
rfds.reset();
|
||||
}
|
||||
if let Some(wfds) = &mut wfds {
|
||||
wfds.reset();
|
||||
}
|
||||
|
||||
let deadline = timeout.map(|v| v + machine::local_timer().timestamp().unwrap());
|
||||
let proc = thread.owner().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user