|
|
@@ -64,17 +64,14 @@ The following functions must be implemented by the sys_arch:
|
|
|
|
|
|
- u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
|
|
|
|
|
|
- Blocks the thread while waiting for the semaphore to be
|
|
|
- signaled. If the "timeout" argument is non-zero, the thread should
|
|
|
- only be blocked for the specified time (measured in
|
|
|
- milliseconds). If the "timeout" argument is zero, the thread should be
|
|
|
- blocked until the semaphore is signalled.
|
|
|
-
|
|
|
- If the timeout argument is non-zero, the return value is the number of
|
|
|
- milliseconds spent waiting for the semaphore to be signaled. If the
|
|
|
- semaphore wasn't signaled within the specified time, the return value is
|
|
|
- SYS_ARCH_TIMEOUT. If the thread didn't have to wait for the semaphore
|
|
|
- (i.e., it was already signaled), the function may return zero.
|
|
|
+ Blocks the thread while waiting for the semaphore to be signaled. If the
|
|
|
+ "timeout" argument is non-zero, the thread should only be blocked for the
|
|
|
+ specified time (measured in milliseconds). If the "timeout" argument is zero,
|
|
|
+ the thread should be blocked until the semaphore is signalled.
|
|
|
+
|
|
|
+ The return value is SYS_ARCH_TIMEOUT if the semaphore wasn't signaled within
|
|
|
+ the specified time or any other value if it was signaled (with or without
|
|
|
+ waiting).
|
|
|
|
|
|
Notice that lwIP implements a function with a similar name,
|
|
|
sys_sem_wait(), that uses the sys_arch_sem_wait() function.
|
|
|
@@ -164,8 +161,8 @@ The following functions must be implemented by the sys_arch:
|
|
|
should be dropped.
|
|
|
|
|
|
The return values are the same as for the sys_arch_sem_wait() function:
|
|
|
- Number of milliseconds spent waiting or SYS_ARCH_TIMEOUT if there was a
|
|
|
- timeout.
|
|
|
+ SYS_ARCH_TIMEOUT if there was a timeout, any other value if a messages
|
|
|
+ is received.
|
|
|
|
|
|
Note that a function with a similar name, sys_mbox_fetch(), is
|
|
|
implemented by lwIP.
|