os_error_t os_mutex_init(struct os_mutex *mu)
Initialize the mutex. Must be called before the mutex can be used.
Arguments | Description |
---|---|
*mu | Pointer to mutex |
OS_INVALID_PARM: returned when *mu is NULL on entry.
OS_OK: mutex initialized successfully.
<Any special feature/special benefit that we want to tout. Does it need to be used with some other specific functions? Any caveats to be careful about (e.g. high memory requirements).>
struct os_mutex g_mutex1; os_error_t err; err = os_mutex_init(&g_mutex1); assert(err == OS_OK);