Skip to content

Commit 4855075

Browse files
netswengmetan-ucw
authored andcommitted
sched: nptl: Fix build failure
The variable named 'wait' conflicts with the system call 'wait()'. Simply rename the variable to avoid the naming conflict. Fixes #1225 Signed-off-by: Stuart R Anderson <anderson@netsweng.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
1 parent fdd6da2 commit 4855075

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

testcases/kernel/sched/nptl/nptl01.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void cleanup();
5555

5656
pthread_mutex_t req;
5757
pthread_mutex_t ack;
58-
pthread_mutex_t wait;
58+
pthread_mutex_t waitx;
5959
pthread_cond_t parent;
6060
pthread_cond_t child;
6161
int idle_count = 0;
@@ -173,9 +173,9 @@ void *run(void *arg)
173173
call_mutex_lock(&req, buf, sizeof(buf));
174174
call_mutex_unlock(&ack, buf, sizeof(buf));
175175

176-
call_mutex_lock(&wait, buf, sizeof(buf));
176+
call_mutex_lock(&waitx, buf, sizeof(buf));
177177
call_cond_signal(&parent, buf, sizeof(buf));
178-
call_mutex_unlock(&wait, buf, sizeof(buf));
178+
call_mutex_unlock(&waitx, buf, sizeof(buf));
179179

180180
call_cond_wait(&child, &req, buf, sizeof(buf));
181181
call_mutex_unlock(&req, buf, sizeof(buf));
@@ -250,7 +250,7 @@ int main(int argc, char **argv)
250250

251251
call_mutex_init(&req, buf, sizeof(buf));
252252
call_mutex_init(&ack, buf, sizeof(buf));
253-
call_mutex_init(&wait, buf, sizeof(buf));
253+
call_mutex_init(&waitx, buf, sizeof(buf));
254254
call_cond_init(&parent, buf, sizeof(buf));
255255
call_cond_init(&child, buf, sizeof(buf));
256256

@@ -266,7 +266,7 @@ int main(int argc, char **argv)
266266
idle_count = 0;
267267
call_mutex_unlock(&ack, buf, sizeof(buf));
268268

269-
do_timedwait(&parent, &wait, buf, sizeof(buf), i);
269+
do_timedwait(&parent, &waitx, buf, sizeof(buf), i);
270270

271271
call_mutex_lock(&req, buf, sizeof(buf));
272272
call_cond_signal(&child, buf, sizeof(buf));

0 commit comments

Comments
 (0)