@@ -37,7 +37,7 @@ static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
static void *
tf1 (void *arg)
{
- struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
+ struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME),
__make_timespec (10000, 0));
/* This call must never return. */
@@ -38,7 +38,7 @@ static pthread_cond_t c = PTHREAD_COND_INITIALIZER;
static void *
tf (void *arg)
{
- struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
+ struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME),
__make_timespec (10000, 0));
/* This call must never return. */
@@ -32,7 +32,7 @@ void __xclock_gettime (clockid_t clock, struct timespec *ts);
/* This helper can often simplify tests by avoiding an explicit
variable declaration or allowing that declaration to be const. */
-static inline struct timespec xclock_now (clockid_t clock)
+static inline struct timespec __xclock_now (clockid_t clock)
{
struct timespec ts;
__xclock_gettime (clock, &ts);
@@ -40,7 +40,7 @@ do_test_clock (clockid_t clockid)
xpthread_mutex_lock (&mut);
/* Waiting for the condition will fail. But we want the timeout here. */
- const struct timespec ts_now = xclock_now (clockid);
+ const struct timespec ts_now = __xclock_now (clockid);
const struct timespec ts_timeout =
timespec_add (ts_now, __make_timespec (0, 500000000));
@@ -53,7 +53,7 @@ do_test_clock (clockid_t clockid)
pthread_t th = xpthread_create (NULL, tf, NULL);
void *status;
- struct timespec timeout = timespec_add (xclock_now (clockid_for_get),
+ struct timespec timeout = timespec_add (__xclock_now (clockid_for_get),
__make_timespec (0, 200000000));
int val;
@@ -68,7 +68,7 @@ do_test_clock (clockid_t clockid)
while (1)
{
- timeout = timespec_add (xclock_now (clockid_for_get),
+ timeout = timespec_add (__xclock_now (clockid_for_get),
__make_timespec (0, 200000000));
if (clockid == CLOCK_USE_TIMEDJOIN)
@@ -45,15 +45,15 @@ static int
thread_join (pthread_t thread, void **retval)
{
#if defined USE_PTHREAD_TIMEDJOIN_NP
- const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
+ const struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME),
__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),
+ const struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME),
__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),
+ const struct timespec ts = timespec_add (__xclock_now (CLOCK_MONOTONIC),
__make_timespec (1000, 0));
return pthread_clockjoin_np (thread, retval, CLOCK_MONOTONIC, &ts);
#else
@@ -67,7 +67,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
FAIL_EXIT1 ("mutex_trylock succeeded");
/* Wait 2 seconds. */
- struct timespec ts_timeout = timespec_add (xclock_now (clockid_for_get),
+ struct timespec ts_timeout = timespec_add (__xclock_now (clockid_for_get),
__make_timespec (2, 0));
if (clockid == CLOCK_USE_TIMEDLOCK)
@@ -86,7 +86,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
TEST_COMPARE (pthread_mutex_clocklock (&m, clockid, &ts_timeout), EINVAL);
TEST_COMPARE (pthread_mutex_unlock (&m), 0);
- const struct timespec ts_start = xclock_now (CLOCK_REALTIME);
+ const struct timespec ts_start = __xclock_now (CLOCK_REALTIME);
/* Wait 2 seconds. */
ts_timeout = timespec_add (ts_start, __make_timespec (2, 0));
@@ -96,7 +96,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
else
TEST_COMPARE (pthread_mutex_clocklock (&m, clockid, &ts_timeout), 0);
- const struct timespec ts_end = xclock_now (clockid_for_get);
+ const struct timespec ts_end = __xclock_now (clockid_for_get);
/* Check that timedlock didn't delay. We use a limit of 0.1 secs. */
TEST_TIMESPEC_BEFORE (ts_end,
@@ -101,7 +101,7 @@ do_test_clock (clockid_t clockid)
if (pthread_mutex_unlock (m) == 0)
FAIL_EXIT1 ("child: mutex_unlock succeeded");
- const struct timespec ts = timespec_add (xclock_now (clockid_for_get),
+ const struct timespec ts = timespec_add (__xclock_now (clockid_for_get),
__make_timespec (0, 500000000));
if (clockid == CLOCK_USE_TIMEDLOCK)