Skip to content

Commit

Permalink
xtensa/esp32s3: reserve memory for a mutex struct depending on the OS
Browse files Browse the repository at this point in the history
Enabling CONFIG_PRIORITY_INHERITANCE config causes a build error

Based on Nuttx OS reserve memory for mutex struct.

Pass build based on
 - CONFIG_PRIORITY_INHERITANCE y
 - CONFIG_SEM_PREALLOCHOLDERS 0/8
  • Loading branch information
sdc-g committed Aug 15, 2024
1 parent a409c42 commit e68c933
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/xtensa/src/common/espressif/platform_include/sys/lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@

struct __lock
{
#ifdef CONFIG_PRIORITY_INHERITANCE
# if CONFIG_SEM_PREALLOCHOLDERS > 0
int reserved[5];
# else
int reserved[8];
# endif
#else
int reserved[4];
#endif
};

typedef _LOCK_T _lock_t;
Expand Down

0 comments on commit e68c933

Please sign in to comment.