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:
patacongo
2012-08-26 21:35:14 +00:00
parent d6b8fcdcf0
commit fe493d8bb8
8 changed files with 113 additions and 79 deletions
+5 -4
View File
@@ -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;
}