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
@ -202,6 +202,14 @@ void robust_test(void)
|
|||||||
nerrors++;
|
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. */
|
/* Make the mutex consistent and try again. It should succeed this time. */
|
||||||
|
|
||||||
printf("robust_test: Make the mutex consistent again.\n");
|
printf("robust_test: Make the mutex consistent again.\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user