summaryrefslogtreecommitdiff
path: root/test/pthread
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-29 03:18:59 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-29 03:18:59 +0000
commit9a7cfea9e5f6a8289e802dc6d39be521760bc525 (patch)
tree045af3bf51bab4da2b715f462452afbaebb6de13 /test/pthread
parentdf80b74f4b2d282ae9b07e951a798936bb706a48 (diff)
fixup shadowed warnings
Diffstat (limited to 'test/pthread')
-rw-r--r--test/pthread/ex7.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c
index 93fc34a8c..9cf30aa19 100644
--- a/test/pthread/ex7.c
+++ b/test/pthread/ex7.c
@@ -27,7 +27,7 @@ test_thread (void *ms_param)
{
unsigned long status = 0;
event_t foo;
- struct timespec time;
+ struct timespec timeout;
struct timeval now;
long ms = (long) ms_param;
@@ -39,13 +39,13 @@ test_thread (void *ms_param)
/* set the time out value */
printf("waiting %ld ms ...\n", ms);
gettimeofday(&now, NULL);
- time.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000;
- time.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000;
+ timeout.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000;
+ timeout.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000;
/* Just use this to test the time out. The cond var is never signaled. */
pthread_mutex_lock(&foo.mutex);
while (foo.flag == 0 && status != ETIMEDOUT) {
- status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &time);
+ status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &timeout);
}
pthread_mutex_unlock(&foo.mutex);