@@ -38,7 +38,7 @@ static void *
tf1 (void *arg)
{
struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
- make_timespec (10000, 0));
+ __make_timespec (10000, 0));
/* This call must never return. */
int e = pthread_mutex_timedlock (&m1, &ts);
@@ -39,7 +39,7 @@ static void *
tf (void *arg)
{
struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
- make_timespec (10000, 0));
+ __make_timespec (10000, 0));
/* This call must never return. */
TEST_COMPARE (pthread_cond_timedwait (&c, &m, &ts), 0);
@@ -63,7 +63,7 @@ tf (void *arg)
xclock_gettime (clockid_for_get, &ts_start);
struct timespec ts_timeout = timespec_add (ts_start,
- make_timespec (0, 300000000));
+ __make_timespec (0, 300000000));
verbose_printf ("child calling %srdlock\n", fnname);
@@ -61,7 +61,7 @@ tf (void *arg)
struct timespec ts_start;
xclock_gettime (clockid_for_get, &ts_start);
const struct timespec ts_timeout = timespec_add (ts_start,
- make_timespec (0, 300000000));
+ __make_timespec (0, 300000000));
if (clockid == CLOCK_USE_TIMEDLOCK)
TEST_COMPARE (pthread_rwlock_timedwrlock (r, &ts_timeout), ETIMEDOUT);
@@ -35,7 +35,7 @@ do_test (void)
sem_t s;
TEST_COMPARE (sem_init (&s, 0, 1), 0);
- const struct timespec ts = make_timespec (0, 0);
+ const struct timespec ts = __make_timespec (0, 0);
/* These clocks are meaningless to sem_clockwait. */
#if defined(CLOCK_PROCESS_CPUTIME_ID)
@@ -42,7 +42,7 @@ do_test_clock (clockid_t clockid)
/* We wait for half a second. */
xclock_gettime (clockid_for_get, &ts);
- ts = timespec_add (ts, make_timespec (0, TIMESPEC_HZ/2));
+ ts = timespec_add (ts, __make_timespec (0, TIMESPEC_HZ/2));
errno = 0;
TEST_COMPARE (TEMP_FAILURE_RETRY ((clockid == CLOCK_USE_TIMEDWAIT)
@@ -61,5 +61,5 @@ timespec_add (struct timespec a, struct timespec b)
}
}
- return make_timespec (rs, rns);
+ return __make_timespec (rs, rns);
}
@@ -61,5 +61,5 @@ timespec_sub (struct timespec a, struct timespec b)
}
}
- return make_timespec (rs, rns);
+ return __make_timespec (rs, rns);
}
@@ -30,7 +30,7 @@ struct timespec timespec_sub (struct timespec, struct timespec)
__attribute__((const));
static inline struct timespec
-make_timespec (time_t s, long int ns)
+__make_timespec (time_t s, long int ns)
{
struct timespec r;
r.tv_sec = s;
@@ -36,7 +36,7 @@ do_test (void)
{
xpthread_mutex_lock (&mut);
- const struct timespec ts = make_timespec (0, 0);
+ const struct timespec ts = __make_timespec (0, 0);
/* These clocks are meaningless to sem_clockwait. */
#if defined(CLOCK_PROCESS_CPUTIME_ID)
@@ -42,7 +42,7 @@ do_test_clock (clockid_t clockid)
/* Waiting for the condition will fail. But we want the timeout here. */
const struct timespec ts_now = xclock_now (clockid);
const struct timespec ts_timeout =
- timespec_add (ts_now, make_timespec (0, 500000000));
+ timespec_add (ts_now, __make_timespec (0, 500000000));
/* In theory pthread_cond_clockwait could return zero here due to
spurious wakeup. However that can't happen without a signal or an
@@ -34,7 +34,7 @@
static void *
tf (void *arg)
{
- struct timespec ts = make_timespec(0, 100000);
+ struct timespec ts = __make_timespec(0, 100000);
nanosleep(&ts, NULL);
return (void *) 42l;
@@ -54,7 +54,7 @@ do_test_clock (clockid_t clockid)
void *status;
struct timespec timeout = timespec_add (xclock_now (clockid_for_get),
- make_timespec (0, 200000000));
+ __make_timespec (0, 200000000));
int val;
if (clockid == CLOCK_USE_TIMEDJOIN)
@@ -69,7 +69,7 @@ do_test_clock (clockid_t clockid)
while (1)
{
timeout = timespec_add (xclock_now (clockid_for_get),
- make_timespec (0, 200000000));
+ __make_timespec (0, 200000000));
if (clockid == CLOCK_USE_TIMEDJOIN)
val = pthread_timedjoin_np (th, &status, &timeout);
@@ -46,15 +46,15 @@ thread_join (pthread_t thread, void **retval)
{
#if defined USE_PTHREAD_TIMEDJOIN_NP
const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
- make_timespec (1000, 0));
+ __make_timespec (1000, 0));
return pthread_timedjoin_np (thread, retval, &ts);
#elif defined USE_PTHREAD_CLOCKJOIN_NP_REALTIME
const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
- make_timespec (1000, 0));
+ __make_timespec (1000, 0));
return pthread_clockjoin_np (thread, retval, CLOCK_REALTIME, &ts);
#elif defined USE_PTHREAD_CLOCKJOIN_NP_MONOTONIC
const struct timespec ts = timespec_add (xclock_now (CLOCK_MONOTONIC),
- make_timespec (1000, 0));
+ __make_timespec (1000, 0));
return pthread_clockjoin_np (thread, retval, CLOCK_MONOTONIC, &ts);
#else
return pthread_join (thread, retval);
@@ -68,7 +68,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
/* Wait 2 seconds. */
struct timespec ts_timeout = timespec_add (xclock_now (clockid_for_get),
- make_timespec (2, 0));
+ __make_timespec (2, 0));
if (clockid == CLOCK_USE_TIMEDLOCK)
TEST_COMPARE (pthread_mutex_timedlock (&m, &ts_timeout), ETIMEDOUT);
@@ -89,7 +89,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
const struct timespec ts_start = xclock_now (CLOCK_REALTIME);
/* Wait 2 seconds. */
- ts_timeout = timespec_add (ts_start, make_timespec (2, 0));
+ ts_timeout = timespec_add (ts_start, __make_timespec (2, 0));
if (clockid == CLOCK_USE_TIMEDLOCK)
TEST_COMPARE (pthread_mutex_timedlock (&m, &ts_timeout), 0);
@@ -100,7 +100,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
/* Check that timedlock didn't delay. We use a limit of 0.1 secs. */
TEST_TIMESPEC_BEFORE (ts_end,
- timespec_add (ts_start, make_timespec (0, 100000000)));
+ timespec_add (ts_start, __make_timespec (0, 100000000)));
TEST_COMPARE (pthread_mutex_unlock (&m), 0);
TEST_COMPARE (pthread_mutex_destroy (&m), 0);
@@ -102,7 +102,7 @@ do_test_clock (clockid_t clockid)
FAIL_EXIT1 ("child: mutex_unlock succeeded");
const struct timespec ts = timespec_add (xclock_now (clockid_for_get),
- make_timespec (0, 500000000));
+ __make_timespec (0, 500000000));
if (clockid == CLOCK_USE_TIMEDLOCK)
TEST_COMPARE (pthread_mutex_timedlock (m, &ts), ETIMEDOUT);