#include "lwip/opt.h"
#include "lwip/err.h"
#include "arch/sys_arch.h"
|
u32_t | sys_arch_mbox_fetch (sys_mbox_t mbox, void **msg, u32_t timeout) |
|
u32_t | sys_arch_mbox_tryfetch (sys_mbox_t mbox, void **msg) |
|
u32_t | sys_arch_sem_wait (sys_sem_t sem, u32_t timeout) |
|
struct sys_timeouts * | sys_arch_timeouts (void) |
|
void | sys_init (void) |
|
u32_t | sys_jiffies (void) |
|
void | sys_mbox_fetch (sys_mbox_t mbox, void **msg) |
| Wait (forever) for a message to arrive in an mbox. More...
|
|
void | sys_mbox_free (sys_mbox_t mbox) |
|
sys_mbox_t | sys_mbox_new (int size) |
|
void | sys_mbox_post (sys_mbox_t mbox, void *msg) |
|
err_t | sys_mbox_trypost (sys_mbox_t mbox, void *msg) |
|
void | sys_msleep (u32_t ms) |
| Sleep for some ms. More...
|
|
u32_t | sys_now (void) |
| Returns the current time in milliseconds. More...
|
|
void | sys_sem_free (sys_sem_t sem) |
|
sys_sem_t | sys_sem_new (u8_t count) |
|
void | sys_sem_signal (sys_sem_t sem) |
|
void | sys_sem_wait (sys_sem_t sem) |
| Wait (forever) for a semaphore to become available. More...
|
|
int | sys_sem_wait_timeout (sys_sem_t sem, u32_t timeout) |
| Wait for a semaphore with timeout (specified in ms) More...
|
|
sys_thread_t | sys_thread_new (char *name, void(*thread)(void *arg), void *arg, int stacksize, int prio) |
|
void | sys_timeout (u32_t msecs, sys_timeout_handler h, void *arg) |
| Create a one-shot timer (aka timeout). More...
|
|
void | sys_untimeout (sys_timeout_handler h, void *arg) |
| Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet. More...
|
|
#define SYS_ARCH_DEC |
( |
|
var, |
|
|
|
val |
|
) |
| |
Value:
} while(0)
#define SYS_ARCH_DECL_PROTECT(lev)
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for ...
Definition: lwip-1.4.1/src/include/lwip/sys.h:284
#define SYS_ARCH_PROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:285
#define SYS_ARCH_UNPROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:286
int val
Definition: jpeglib.h:957
#define SYS_ARCH_DECL_PROTECT |
( |
|
lev | ) |
|
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for certain critical regions during buffer allocation, deallocation and memory allocation and deallocation.
#define SYS_ARCH_GET |
( |
|
var, |
|
|
|
ret |
|
) |
| |
Value:
} while(0)
#define SYS_ARCH_DECL_PROTECT(lev)
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for ...
Definition: lwip-1.4.1/src/include/lwip/sys.h:284
#define SYS_ARCH_PROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:285
#define SYS_ARCH_UNPROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:286
#define SYS_ARCH_INC |
( |
|
var, |
|
|
|
val |
|
) |
| |
Value:
} while(0)
#define SYS_ARCH_DECL_PROTECT(lev)
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for ...
Definition: lwip-1.4.1/src/include/lwip/sys.h:284
#define SYS_ARCH_PROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:285
#define SYS_ARCH_UNPROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:286
int val
Definition: jpeglib.h:957
#define SYS_ARCH_PROTECT |
( |
|
lev | ) |
|
#define SYS_ARCH_SET |
( |
|
var, |
|
|
|
val |
|
) |
| |
Value:
} while(0)
#define SYS_ARCH_DECL_PROTECT(lev)
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for ...
Definition: lwip-1.4.1/src/include/lwip/sys.h:284
#define SYS_ARCH_PROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:285
#define SYS_ARCH_UNPROTECT(lev)
Definition: lwip-1.4.1/src/include/lwip/sys.h:286
int val
Definition: jpeglib.h:957
#define SYS_ARCH_TIMEOUT 0xffffffffUL |
Return code for timeouts from sys_arch_mbox_fetch and sys_arch_sem_wait.
#define SYS_ARCH_UNPROTECT |
( |
|
lev | ) |
|
typedef void(* sys_timeout_handler)(void *arg) |
u32_t sys_arch_mbox_fetch |
( |
sys_mbox_t |
mbox, |
|
|
void ** |
msg, |
|
|
u32_t |
timeout |
|
) |
| |
u32_t sys_arch_mbox_tryfetch |
( |
sys_mbox_t |
mbox, |
|
|
void ** |
msg |
|
) |
| |
u32_t sys_arch_sem_wait |
( |
sys_sem_t |
sem, |
|
|
u32_t |
timeout |
|
) |
| |
u32_t sys_jiffies |
( |
void |
| ) |
|
void sys_mbox_fetch |
( |
sys_mbox_t |
mbox, |
|
|
void ** |
msg |
|
) |
| |
Wait (forever) for a message to arrive in an mbox.
While waiting, timeouts (for this thread) are processed.
- Parameters
-
mbox | the mbox to fetch the message from |
msg | the place to store the message |
References sys_timeo::arg, arg, sys_timeo::h, LOCK_TCPIP_CORE, LWIP_DEBUGF, memp_free(), sys_timeo::next, sys_timeouts::next, NULL, sys_arch_mbox_fetch(), SYS_ARCH_TIMEOUT, sys_arch_timeouts(), SYS_DEBUG, sys_timeo::time, and UNLOCK_TCPIP_CORE.
void sys_mbox_free |
( |
sys_mbox_t |
mbox | ) |
|
sys_mbox_t sys_mbox_new |
( |
int |
size | ) |
|
void sys_mbox_post |
( |
sys_mbox_t |
mbox, |
|
|
void * |
msg |
|
) |
| |
err_t sys_mbox_trypost |
( |
sys_mbox_t |
mbox, |
|
|
void * |
msg |
|
) |
| |
void sys_msleep |
( |
u32_t |
ms | ) |
|
Sleep for some ms.
Timeouts are NOT processed while sleeping.
- Parameters
-
ms | number of milliseconds to sleep |
Timeouts are processed while sleeping.
- Parameters
-
ms | number of milliseconds to sleep |
Returns the current time in milliseconds.
Returns the current time in milliseconds.
void sys_sem_free |
( |
sys_sem_t |
sem | ) |
|
sys_sem_t sys_sem_new |
( |
u8_t |
count | ) |
|
void sys_sem_signal |
( |
sys_sem_t |
sem | ) |
|
void sys_sem_wait |
( |
sys_sem_t |
sem | ) |
|
Wait (forever) for a semaphore to become available.
While waiting, timeouts (for this thread) are processed.
- Parameters
-
References sys_timeo::arg, arg, sys_timeo::h, LWIP_DEBUGF, memp_free(), sys_timeo::next, sys_timeouts::next, NULL, sys_arch_sem_wait(), SYS_ARCH_TIMEOUT, sys_arch_timeouts(), SYS_DEBUG, and sys_timeo::time.
int sys_sem_wait_timeout |
( |
sys_sem_t |
sem, |
|
|
u32_t |
timeout |
|
) |
| |
sys_thread_t sys_thread_new |
( |
char * |
name, |
|
|
void(*)(void *arg) |
thread, |
|
|
void * |
arg, |
|
|
int |
stacksize, |
|
|
int |
prio |
|
) |
| |
Create a one-shot timer (aka timeout).
Timeouts are processed in the following cases:
- Parameters
-
msecs | time in milliseconds after that the timer should expire |
h | callback function to call when msecs have elapsed |
arg | argument to pass to the callback function |
Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet.
- Note
- This function only works as expected if there is only one timeout calling 'h' in the list of timeouts.
- Parameters
-
h | callback function that would be called by the timeout |
arg | callback argument that would be passed to h |