pthread: Fix race conditions in existing pthread UTs

This commit is contained in:
Angus Gratton
2021-06-16 10:43:21 +10:00
committed by bot
parent 262107691a
commit c685ef303b
2 changed files with 11 additions and 8 deletions
+1
View File
@@ -12,6 +12,7 @@ static void *compute_square(void *arg)
{
int *num = (int *) arg;
*num = (*num) * (*num);
vTaskDelay(2); // ensure the test task has time to continue execution
pthread_exit((void *) num);
return NULL;
}