diff options
author | px4dev <px4@purgatory.org> | 2012-08-28 09:43:37 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-08-28 09:43:37 -0700 |
commit | 30b670a6eecc9e0a1196f1d9dc09743b2e1422b9 (patch) | |
tree | 8ee9bc56e9cfcbeb53f495ccee55e4d73953a99f /apps/examples | |
parent | 936940abc939f939be11d8b1f161877f37f32c21 (diff) | |
parent | bbe3db55f26c2aef2f2ba27bf726bee1ec039b24 (diff) | |
download | px4-firmware-30b670a6eecc9e0a1196f1d9dc09743b2e1422b9.tar.gz px4-firmware-30b670a6eecc9e0a1196f1d9dc09743b2e1422b9.tar.bz2 px4-firmware-30b670a6eecc9e0a1196f1d9dc09743b2e1422b9.zip |
Merge branch 'NuttX/master'
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5060 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/ostest/prioinherit.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/examples/ostest/prioinherit.c b/apps/examples/ostest/prioinherit.c index 87849abcf..eea5a818f 100644 --- a/apps/examples/ostest/prioinherit.c +++ b/apps/examples/ostest/prioinherit.c @@ -59,20 +59,28 @@ # define CONFIG_SEM_PREALLOCHOLDERS 0 #endif +/* If resources were configured for lots of holders, then run 3 low priority + * threads. Otherwise, just one. + */ + #if CONFIG_SEM_PREALLOCHOLDERS > 3 # define NLOWPRI_THREADS 3 #else -# define NLOWPRI_THREADS (CONFIG_SEM_PREALLOCHOLDERS+1) +# define NLOWPRI_THREADS 1 #endif #ifndef CONFIG_SEM_NNESTPRIO # define CONFIG_SEM_NNESTPRIO 0 #endif +/* Where resources configured for lots of waiters? If so then run 3 high + * priority threads. Otherwise, just one. + */ + #if CONFIG_SEM_NNESTPRIO > 3 # define NHIGHPRI_THREADS 3 #else -# define NHIGHPRI_THREADS (CONFIG_SEM_NNESTPRIO+1) +# define NHIGHPRI_THREADS 1 #endif /**************************************************************************** |