feat(server-framework): add Server trait, Encode/Decode, async executor, syscall wrappers, and mock arch for host testing
This commit is contained in:
15
crates/server-framework/src/async_syscall/mod.rs
Normal file
15
crates/server-framework/src/async_syscall/mod.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
pub async fn send(endpoint: usize, w0: usize, w1: usize, w2: usize, w3: usize) -> usize {
|
||||
userspace::syscall::send(endpoint, w0, w1, w2, w3)
|
||||
}
|
||||
|
||||
pub async fn receive(endpoint: usize) -> (usize, usize, usize, usize) {
|
||||
userspace::syscall::receive(endpoint)
|
||||
}
|
||||
|
||||
pub async fn wait_for_interrupt(irq: usize) {
|
||||
userspace::syscall::yield_now();
|
||||
}
|
||||
|
||||
pub async fn acknowledge_interrupt(irq: usize) {
|
||||
let _ = irq;
|
||||
}
|
||||
Reference in New Issue
Block a user