mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 13:57:35 +08:00
Add some protection to the priority inheritance logic when sem_post() is called from an interrupt handler
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5060 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -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
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user