WIP: Kevent
This commit is contained in:
parent
94ef9dd14a
commit
616dfbc055
16 changed files with 131 additions and 13 deletions
|
@ -52,7 +52,7 @@ impl UserInner {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe { context::switch(); }
|
||||
unsafe { context::switch(); } //TODO: Block
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ impl UserInner {
|
|||
if i > 0 {
|
||||
return Ok(i * packet_size);
|
||||
} else {
|
||||
unsafe { context::switch(); }
|
||||
unsafe { context::switch(); } //TODO: Block
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -230,7 +230,12 @@ impl Scheme for UserScheme {
|
|||
|
||||
fn seek(&self, file: usize, position: usize, whence: usize) -> Result<usize> {
|
||||
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
|
||||
inner.call(SYS_FSYNC, file, position, whence)
|
||||
inner.call(SYS_LSEEK, file, position, whence)
|
||||
}
|
||||
|
||||
fn fevent(&self, file: usize, flags: usize) -> Result<usize> {
|
||||
let inner = self.inner.upgrade().ok_or(Error::new(ENODEV))?;
|
||||
inner.call(SYS_FEVENT, file, flags, 0)
|
||||
}
|
||||
|
||||
fn fstat(&self, file: usize, stat: &mut Stat) -> Result<usize> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue