diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/h5test.c | 2 | ||||
-rw-r--r-- | test/thread_id.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/h5test.c b/test/h5test.c index 53a4fdb..03731c6 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1173,7 +1173,7 @@ h5_show_hostname(void) HDprintf("thread 0."); } #else - HDprintf("thread %lu.", H5TS_thread_id()); + HDprintf("thread %" PRIu64 ".", H5TS_thread_id()); #endif #ifdef H5_HAVE_WIN32_API diff --git a/test/thread_id.c b/test/thread_id.c index 711a21b..75ffe17 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -71,29 +71,30 @@ atomic_printf(const char *fmt, ...) static void * thread_main(void H5_ATTR_UNUSED *arg) { - unsigned long ntid, tid; + uint64_t ntid, tid; tid = H5TS_thread_id(); if (tid < 1 || NTHREADS < tid) { - atomic_printf("unexpected tid %lu FAIL\n", tid); + atomic_printf("unexpected tid %" PRIu64 " FAIL\n", tid); goto pre_barrier_error; } pthread_mutex_lock(&used_lock); if (used[tid - 1]) { - atomic_printf("reused tid %lu FAIL\n", tid); + atomic_printf("reused tid %" PRIu64 " FAIL\n", tid); pthread_mutex_unlock(&used_lock); goto pre_barrier_error; } used[tid - 1] = true; pthread_mutex_unlock(&used_lock); - atomic_printf("tid %lu in [1, %d] PASS\n", tid, NTHREADS); + atomic_printf("tid %" PRIu64 " in [1, %d] PASS\n", tid, NTHREADS); pthread_barrier_wait(&barrier); ntid = H5TS_thread_id(); if (ntid != tid) { - atomic_printf("tid changed from %lu to %lu FAIL\n", tid, ntid); + atomic_printf("tid changed from %" PRIu64 " to %" PRIu64 " FAIL\n", + tid, ntid); failed = true; } return NULL; |