Skip to content

Commit

Permalink
nuttx/semaphore: Move define CONFIG_SEM_PREALLOCHOLDERS to include/se…
Browse files Browse the repository at this point in the history
…maphore.h.

Move CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h to avoid undefined issues from occurring in other places as well.

Signed-off-by: cuiziwei <[email protected]>
  • Loading branch information
cuiziweizw authored and xiaoxiang781216 committed Oct 31, 2024
1 parent fbaace0 commit d1e5b38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions include/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@

#define SEM_FAILED NULL

#ifndef CONFIG_SEM_PREALLOCHOLDERS
# define CONFIG_SEM_PREALLOCHOLDERS 0
#endif

/****************************************************************************
* Public Type Declarations
****************************************************************************/
Expand Down
6 changes: 0 additions & 6 deletions sched/semaphore/sem_holder.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@
* Pre-processor Definitions
****************************************************************************/

/* Configuration ************************************************************/

#ifndef CONFIG_SEM_PREALLOCHOLDERS
# define CONFIG_SEM_PREALLOCHOLDERS 0
#endif

/****************************************************************************
* Private Type Declarations
****************************************************************************/
Expand Down

0 comments on commit d1e5b38

Please sign in to comment.