diff options
Diffstat (limited to 'nuttx/sched/sem_init.c')
-rw-r--r-- | nuttx/sched/sem_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nuttx/sched/sem_init.c b/nuttx/sched/sem_init.c index 05485a600..65707949f 100644 --- a/nuttx/sched/sem_init.c +++ b/nuttx/sched/sem_init.c @@ -99,7 +99,9 @@ int sem_init (FAR sem_t *sem, int pshared, unsigned int value) { sem->semcount = (sint16)value; #ifdef CONFIG_PRIORITY_INHERITANCE +#if CONFIG_SEM_PREALLOCHOLDERS > 0 sem->hlist.flink = NULL; +#endif sem->hlist.holder = NULL; sem->hlist.counts = 0; #endif |