System functions

System function are used in conjunction with thread safety. Please check Thread safety section for more information

group LWPRINTF_SYS

System functions when used with operating system.

Functions

uint8_t lwprintf_sys_mutex_create(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Create a new mutex and assign value to handle.

Return

1 on success, 0 otherwise

Parameters
  • [out] m: Output variable to save mutex handle

uint8_t lwprintf_sys_mutex_isvalid(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Check if mutex handle is valid.

Return

1 on success, 0 otherwise

Parameters
  • [in] m: Mutex handle to check if valid

uint8_t lwprintf_sys_mutex_wait(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Wait for a mutex until ready (unlimited time)

Return

1 on success, 0 otherwise

Parameters
  • [in] m: Mutex handle to wait for

uint8_t lwprintf_sys_mutex_release(LWPRINTF_CFG_OS_MUTEX_HANDLE *m)

Release already locked mutex.

Return

1 on success, 0 otherwise

Parameters
  • [in] m: Mutex handle to release