Smp (#23)
* Fire up multiple processors * Use IPIs to wake up secondary processors * Much better exception information * Modifications to show more information on fault * WIP: Use real libstd * Add TLS (not complete) * Add random function, export getpid, cleanup * Do not spin APs until new context * Update rust * Update rust * Use rd/wrfsbase * Implement TLS * Implement compiler builtins and update rust * Update rust * Back to Redox libstd * Update rust
This commit is contained in:
parent
25dc44b348
commit
149b0297a4
54 changed files with 1121 additions and 380 deletions
|
@ -31,7 +31,7 @@ impl<R> EventQueue<R> {
|
|||
/// Err can be used to allow the callback to return an I/O error, and break the
|
||||
/// event loop
|
||||
pub fn add<F: FnMut(usize) -> Result<Option<R>> + 'static>(&mut self, fd: RawFd, callback: F) -> Result<()> {
|
||||
syscall::fevent(fd, syscall::EVENT_READ).map_err(|x| Error::from_sys(x))?;
|
||||
syscall::fevent(fd, syscall::EVENT_READ).map_err(|x| Error::from_raw_os_error(x.errno))?;
|
||||
|
||||
self.callbacks.insert(fd, Box::new(callback));
|
||||
|
||||
|
@ -41,7 +41,7 @@ impl<R> EventQueue<R> {
|
|||
/// Remove a file from the event queue, returning its callback if found
|
||||
pub fn remove(&mut self, fd: RawFd) -> Result<Option<Box<FnMut(usize) -> Result<Option<R>>>>> {
|
||||
if let Some(callback) = self.callbacks.remove(&fd) {
|
||||
syscall::fevent(fd, 0).map_err(|x| Error::from_sys(x))?;
|
||||
syscall::fevent(fd, 0).map_err(|x| Error::from_raw_os_error(x.errno))?;
|
||||
|
||||
Ok(Some(callback))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue