From ae0c3abd7f9bba4319546ccbbbc42328c185f79e Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 26 Aug 2012 21:35:14 +0000 Subject: 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 --- apps/examples/ostest/prioinherit.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/examples') 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 -- cgit v1.2.3