Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
OS abstraction layer. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | lwip_thread_fn )(void *arg) |
Function prototype for thread functions. | |
Functions | |
err_t | sys_mutex_new (sys_mutex_t *mutex) |
Create a new mutex. | |
void | sys_mutex_lock (sys_mutex_t *mutex) |
Blocks the thread until the mutex can be grabbed. | |
void | sys_mutex_unlock (sys_mutex_t *mutex) |
Releases the mutex previously locked through 'sys_mutex_lock()'. | |
void | sys_mutex_free (sys_mutex_t *mutex) |
Deallocates a mutex. | |
int | sys_mutex_valid (sys_mutex_t *mutex) |
Returns 1 if the mutes is valid, 0 if it is not valid. | |
void | sys_mutex_set_invalid (sys_mutex_t *mutex) |
Invalidate a mutex so that sys_mutex_valid() returns 0. | |
err_t | sys_sem_new (sys_sem_t *sem, u8_t count) |
Create a new semaphore Creates a new semaphore. | |
void | sys_sem_signal (sys_sem_t *sem) |
Signals a semaphore. | |
u32_t | sys_arch_sem_wait (sys_sem_t *sem, u32_t timeout) |
Blocks the thread while waiting for the semaphore to be signaled. | |
void | sys_sem_free (sys_sem_t *sem) |
Deallocates a semaphore. | |
int | sys_sem_valid (sys_sem_t *sem) |
Returns 1 if the semaphore is valid, 0 if it is not valid. | |
void | sys_sem_set_invalid (sys_sem_t *sem) |
Invalidate a semaphore so that sys_sem_valid() returns 0. | |
void | sys_msleep (u32_t ms) |
Sleep for specified number of ms. | |
err_t | sys_mbox_new (sys_mbox_t *mbox, int size) |
Creates an empty mailbox for maximum "size" elements. | |
void | sys_mbox_post (sys_mbox_t *mbox, void *msg) |
Post a message to an mbox - may not fail -> blocks if full, only to be used from tasks NOT from ISR! | |
err_t | sys_mbox_trypost (sys_mbox_t *mbox, void *msg) |
Try to post a message to an mbox - may fail if full. | |
err_t | sys_mbox_trypost_fromisr (sys_mbox_t *mbox, void *msg) |
Try to post a message to an mbox - may fail if full. | |
u32_t | sys_arch_mbox_fetch (sys_mbox_t *mbox, void **msg, u32_t timeout) |
Blocks the thread until a message arrives in the mailbox, but does not block the thread longer than "timeout" milliseconds (similar to the sys_arch_sem_wait() function). | |
u32_t | sys_arch_mbox_tryfetch (sys_mbox_t *mbox, void **msg) |
This is similar to sys_arch_mbox_fetch, however if a message is not present in the mailbox, it immediately returns with the code SYS_MBOX_EMPTY. | |
void | sys_mbox_free (sys_mbox_t *mbox) |
Deallocates a mailbox. | |
int | sys_mbox_valid (sys_mbox_t *mbox) |
Returns 1 if the mailbox is valid, 0 if it is not valid. | |
void | sys_mbox_set_invalid (sys_mbox_t *mbox) |
Invalidate a mailbox so that sys_mbox_valid() returns 0. | |
sys_thread_t | sys_thread_new (const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio) |
The only thread function: Starts a new thread named "name" with priority "prio" that will begin its execution in the function "thread()". | |
void | sys_init (void) |
sys_init() must be called before anything else. | |
u32_t | sys_jiffies (void) |
Ticks/jiffies since power up. | |
u32_t | sys_now (void) |
Returns the current time in milliseconds, may be the same as sys_jiffies or at least based on it. |
Detailed Description
OS abstraction layer.
Definition in file sys.h.
Typedef Documentation
typedef void(* lwip_thread_fn)(void *arg) |
Function Documentation
u32_t sys_jiffies | ( | void | ) |
Ticks/jiffies since power up.
Definition at line 48 of file sys_arch.c.
Generated on Tue Jul 12 2022 13:55:19 by
