summaryrefslogtreecommitdiff
path: root/apps/examples/ostest
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-08-26 21:35:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-08-26 21:35:14 +0000
commitae0c3abd7f9bba4319546ccbbbc42328c185f79e (patch)
tree6579ef65801f07d0974c3767c92c2dff92604dc5 /apps/examples/ostest
parenteaf78a73f7ec364393bddfc0f72745794522811c (diff)
downloadnuttx-ae0c3abd7f9bba4319546ccbbbc42328c185f79e.tar.gz
nuttx-ae0c3abd7f9bba4319546ccbbbc42328c185f79e.tar.bz2
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 'apps/examples/ostest')
-rw-r--r--apps/examples/ostest/prioinherit.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/examples/ostest/prioinherit.c b/apps/examples/ostest/prioinherit.c
index 993c9e14a..87849abcf 100644
--- a/apps/examples/ostest/prioinherit.c
+++ b/apps/examples/ostest/prioinherit.c
@@ -58,12 +58,22 @@
#ifndef CONFIG_SEM_PREALLOCHOLDERS
# define CONFIG_SEM_PREALLOCHOLDERS 0
#endif
-#define NLOWPRI_THREADS (CONFIG_SEM_PREALLOCHOLDERS+1)
+
+#if CONFIG_SEM_PREALLOCHOLDERS > 3
+# define NLOWPRI_THREADS 3
+#else
+# define NLOWPRI_THREADS (CONFIG_SEM_PREALLOCHOLDERS+1)
+#endif
#ifndef CONFIG_SEM_NNESTPRIO
# define CONFIG_SEM_NNESTPRIO 0
#endif
-#define NHIGHPRI_THREADS (CONFIG_SEM_NNESTPRIO+1)
+
+#if CONFIG_SEM_NNESTPRIO > 3
+# define NHIGHPRI_THREADS 3
+#else
+# define NHIGHPRI_THREADS (CONFIG_SEM_NNESTPRIO+1)
+#endif
/****************************************************************************
* Private Data