testing: ostest: Add workaround for SMP in cond.c
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
This commit is contained in:
parent
39bf19d1f4
commit
102d7670c3
@ -181,6 +181,19 @@ static void *thread_signaler(void *parameter)
|
||||
signaler_nerrors++;
|
||||
}
|
||||
|
||||
#if CONFIG_SMP_NCPUS > 1
|
||||
/* Workaround for SMP:
|
||||
* In multi-core environment, thread_signaler would be excecuted prior
|
||||
* to the thread_waiter, even though priority of thread_signaler is
|
||||
* lower than the thread_waiter. In this case, thread_signaler will
|
||||
* aquire mutex before the thread_waiter aquires it and will show
|
||||
* the error message such as "thread_signaler: ERROR waiter state...".
|
||||
* To avoid this situaltion, we add the following usleep()
|
||||
*/
|
||||
|
||||
usleep(10 * 1000);
|
||||
#endif
|
||||
|
||||
signaler_nloops++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user