xous: renamed WouldBlock to RetryCall

This gives a better idea of what this syscall does.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-08-16 12:22:24 +08:00
parent 1d0a952331
commit d126108412
2 changed files with 21 additions and 3 deletions

View file

@ -783,7 +783,7 @@ pub enum Result {
/// The syscall should be attempted again. This is returned when calling
/// functions such as `try_connect()` and `try_send()` that may block.
WouldBlock,
RetryCall,
/// The message was successful but no value was returned.
None,
@ -838,7 +838,7 @@ impl Result {
0,
]
}
Result::WouldBlock => [16, 0, 0, 0, 0, 0, 0, 0],
Result::RetryCall => [16, 0, 0, 0, 0, 0, 0, 0],
Result::None => [17, 0, 0, 0, 0, 0, 0, 0],
Result::MemoryReturned(offset, valid) => [
18,
@ -923,7 +923,7 @@ impl Result {
SID::from_u32(src[1] as _, src[2] as _, src[3] as _, src[4] as _),
src[5] as _,
),
16 => Result::WouldBlock,
16 => Result::RetryCall,
17 => Result::None,
18 => Result::MemoryReturned(MemorySize::new(src[1]), MemorySize::new(src[2])),
_ => Result::UnknownResult(src[0], src[1], src[2], src[3], src[4], src[5], src[6]),

View file

@ -0,0 +1,18 @@
pub enum AtomicOperation {
/// Lock the mutex at the given address. If the Mutex is locked, this
/// thread will block.
MutexLock(usize /* Address */),
/// Unlock the mutex at the given address. If arg 2 is `true`, then
/// the next thread that is waiting on this Mutex will be activated.
/// This can be used to prevent deadlocks. If no thread is waiting,
/// then no thread switch is made and execution resumes in the current
/// thread.
MutexUnlock(usize /* Address */, bool /* Should Switch Immediately */),
CondvarWait(usize /* Address */),
CondvarWaitTimeout(usize /* Address */, usize /* Timeout (ms) */),
CondvarNotifyOne(usize /* Address */),
CondvarNotifyAll(usize /* Address */),
}