diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-26 21:35:14 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-26 21:35:14 +0000 |
commit | ae0c3abd7f9bba4319546ccbbbc42328c185f79e (patch) | |
tree | 6579ef65801f07d0974c3767c92c2dff92604dc5 /nuttx/lib | |
parent | eaf78a73f7ec364393bddfc0f72745794522811c (diff) | |
download | px4-nuttx-ae0c3abd7f9bba4319546ccbbbc42328c185f79e.tar.gz px4-nuttx-ae0c3abd7f9bba4319546ccbbbc42328c185f79e.tar.bz2 px4-nuttx-ae0c3abd7f9bba4319546ccbbbc42328c185f79e.zip |
Fix some list handling associated with priority inheritance
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5053 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r-- | nuttx/lib/semaphore/sem_init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/lib/semaphore/sem_init.c b/nuttx/lib/semaphore/sem_init.c index ea1c6e84e..bc14415f9 100644 --- a/nuttx/lib/semaphore/sem_init.c +++ b/nuttx/lib/semaphore/sem_init.c @@ -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; } |