mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 04:13:34 +08:00
Fix some list handling associated with priority inheritance
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5053 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -103,16 +103,17 @@ int sem_init(FAR sem_t *sem, int pshared, unsigned int value)
|
||||
{
|
||||
/* Initialize the seamphore count */
|
||||
|
||||
sem->semcount = (int16_t)value;
|
||||
sem->semcount = (int16_t)value;
|
||||
|
||||
/* Initialize to support priority inheritance */
|
||||
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
# if CONFIG_SEM_PREALLOCHOLDERS > 0
|
||||
sem->hlist.flink = NULL;
|
||||
sem->hhead = NULL;
|
||||
# else
|
||||
sem->holder.htcb = NULL;
|
||||
sem->holder.counts = 0;
|
||||
# endif
|
||||
sem->hlist.holder = NULL;
|
||||
sem->hlist.counts = 0;
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user