summaryrefslogtreecommitdiffstats
path: root/test/thread_id.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-12 20:07:47 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-02-12 20:07:47 (GMT)
commitb4697f969295245840350e17d75d92a0fdd7e7a9 (patch)
treee72274f3450d77258169856e474d87807151558c /test/thread_id.c
parent4c7254b6eca3245d176d59a6a5390f42cd3e4b69 (diff)
downloadhdf5-b4697f969295245840350e17d75d92a0fdd7e7a9.zip
hdf5-b4697f969295245840350e17d75d92a0fdd7e7a9.tar.gz
hdf5-b4697f969295245840350e17d75d92a0fdd7e7a9.tar.bz2
Use HD prefix.
Diffstat (limited to 'test/thread_id.c')
-rw-r--r--test/thread_id.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/thread_id.c b/test/thread_id.c
index 21be12d..af36625 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -32,12 +32,12 @@ my_errx(int code, const char *fmt, ...)
{
va_list ap;
- (void)fprintf(stderr, "thread_id: ");
- va_start(ap, fmt);
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fputc('\n', stderr);
- exit(code);
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfputc('\n', stderr);
+ HDexit(code);
}
#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
@@ -50,17 +50,17 @@ my_err(int code, const char *fmt, ...)
va_list ap;
int errno_copy = errno;
- (void)fprintf(stderr, "thread_id: ");
- va_start(ap, fmt);
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, ": %s\n", strerror(errno_copy));
- exit(code);
+ (void)HDfprintf(stderr, "thread_id: ");
+ HDva_start(ap, fmt);
+ (void)HDvfprintf(stderr, fmt, ap);
+ HDva_end(ap);
+ (void)HDfprintf(stderr, ": %s\n", HDstrerror(errno_copy));
+ HDexit(code);
}
#define threads_failure(_call, _result) do { \
my_errx(EXIT_FAILURE, "%s.%d: " #_call ": %s", __func__, \
- __LINE__, strerror(_result)); \
+ __LINE__, HDstrerror(_result)); \
} while (false)
#define NTHREADS 5