aboutsummaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-26 21:35:14 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-08-26 21:35:14 +0000
commitfe493d8bb89c6f052f2cd8a66c00f50fd77ad442 (patch)
tree6579ef65801f07d0974c3767c92c2dff92604dc5 /apps/examples
parentd6b8fcdcf0834d1515ae254143eaf6ac9f2e4307 (diff)
downloadpx4-firmware-fe493d8bb89c6f052f2cd8a66c00f50fd77ad442.tar.gz
px4-firmware-fe493d8bb89c6f052f2cd8a66c00f50fd77ad442.tar.bz2
px4-firmware-fe493d8bb89c6f052f2cd8a66c00f50fd77ad442.zip
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
Diffstat (limited to 'apps/examples')
-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