mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-11 13:16:35 +00:00
ostest: fix smp ostest fail
In SMP we need improve thread waiting strategy Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
f0f98c3d73
commit
5b2a89e174
1 changed files with 8 additions and 0 deletions
|
|
@ -202,6 +202,14 @@ void robust_test(void)
|
|||
nerrors++;
|
||||
}
|
||||
|
||||
/* Make sure waiter exit completely */
|
||||
|
||||
do
|
||||
{
|
||||
sleep(1);
|
||||
}
|
||||
while (kill(g_robust_mutex.pid, 0) == 0 || errno != ESRCH);
|
||||
|
||||
/* Make the mutex consistent and try again. It should succeed this time. */
|
||||
|
||||
printf("robust_test: Make the mutex consistent again.\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue