mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-15 17:33:23 +00:00
OS test: Sporadic test was passing an illegal value for max_repl
This commit is contained in:
parent
51b645eb34
commit
b0fa962e42
1 changed files with 5 additions and 1 deletions
|
|
@ -58,6 +58,10 @@
|
|||
# define NULL (void*)0
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* Private Data
|
||||
***********************************************************************/
|
||||
|
|
@ -268,7 +272,7 @@ void sporadic_test(void)
|
|||
sparam.sched_ss_repl_period.tv_nsec = 0;
|
||||
sparam.sched_ss_init_budget.tv_sec = 2;
|
||||
sparam.sched_ss_init_budget.tv_nsec = 0;
|
||||
sparam.sched_ss_max_repl = 5;
|
||||
sparam.sched_ss_max_repl = MIN(5, CONFIG_SCHED_SPORADIC_MAXREPL);
|
||||
|
||||
ret = pthread_attr_setschedparam(&attr, &sparam);
|
||||
if (ret != OK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue