mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add drop implementation to servers
This commit is contained in:
parent
265f99c6ae
commit
25dc27f2f7
4 changed files with 26 additions and 1 deletions
|
|
@ -37,3 +37,11 @@ impl Ticktimer {
|
||||||
).map(|_| ())
|
).map(|_| ())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Drop for Ticktimer {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
// de-allocate myself. It's unsafe because we are responsible to make sure nobody else is using the connection.
|
||||||
|
unsafe{xous::disconnect(self.conn).unwrap();}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -37,3 +37,11 @@ impl Trng {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Drop for Trng {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
// de-allocate myself. It's unsafe because we are responsible to make sure nobody else is using the connection.
|
||||||
|
unsafe{xous::disconnect(self.conn).unwrap();}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -75,3 +75,11 @@ impl XousNames {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Drop for XousNames {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
// de-allocate myself. It's unsafe because we are responsible to make sure nobody else is using the connection.
|
||||||
|
unsafe{xous::disconnect(self.conn).unwrap();}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -48,7 +48,8 @@ fn try_main() -> Result<(), DynError> {
|
||||||
"xous-names",
|
"xous-names",
|
||||||
//"keyboard",
|
//"keyboard",
|
||||||
"trng",
|
"trng",
|
||||||
"llio",
|
|
||||||
|
"llio", // still to convert
|
||||||
"rkyv-test-client",
|
"rkyv-test-client",
|
||||||
"rkyv-test-server",
|
"rkyv-test-server",
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue