Skip to content

Commit

Permalink
nuttx/mutex.h: bug fix, change MUTEX_INITIALIZER to NXMUTEX_INITIALIZER
Browse files Browse the repository at this point in the history
Now nuttx use NXMUTEX_INITIALIZER to initialize the mutex, so updated.

Signed-off-by: Bowen Wang <[email protected]>
  • Loading branch information
CV-Bowen committed Oct 29, 2024
1 parent 289e4de commit 5054f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/system/nuttx/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ typedef mutex_t metal_mutex_t;
* METAL_MUTEX_INIT - used for initializing an mutex element in a static struct
* or global
*/
#define METAL_MUTEX_INIT(m) MUTEX_INITIALIZER
#define METAL_MUTEX_INIT(m) NXMUTEX_INITIALIZER
/*
* METAL_MUTEX_DEFINE - used for defining and initializing a global or
* static singleton mutex
*/
#define METAL_MUTEX_DEFINE(m) metal_mutex_t m = MUTEX_INITIALIZER
#define METAL_MUTEX_DEFINE(m) metal_mutex_t m = NXMUTEX_INITIALIZER

static inline void __metal_mutex_init(metal_mutex_t *mutex)
{
Expand Down

0 comments on commit 5054f5f

Please sign in to comment.