Skip to content

Commit 633b499

Browse files
committed
Adjust timing in test pthread_cond_signal/1-1.c to make it pass on Emscripten. The test had a too small timeout and would incorrectly believe no thread had woken up.
1 parent e79dcec commit 633b499

File tree

1 file changed

+3
-3
lines changed
  • conformance/interfaces/pthread_cond_signal

1 file changed

+3
-3
lines changed

conformance/interfaces/pthread_cond_signal/1-1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ struct testdata
2929

3030
pthread_t thread[THREAD_NUM];
3131

32-
int start_num = 0;
33-
int waken_num = 0;
32+
volatile int start_num = 0;
33+
volatile int waken_num = 0;
3434

3535
/* Alarm handler */
3636
void alarm_handler(int signo)
@@ -142,7 +142,7 @@ int main()
142142
fprintf(stderr,"Main failed to signal the condition\n");
143143
exit(PTS_UNRESOLVED);
144144
}
145-
usleep(100);
145+
usleep(1000);
146146
}
147147

148148
if (i >= THREAD_NUM) {

0 commit comments

Comments
 (0)