summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/regression/pthread/mutex_isowned_np/Makefile (renamed from tools/regression/pthread/mutex_islocked_np/Makefile)2
-rw-r--r--tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c (renamed from tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c)16
2 files changed, 9 insertions, 9 deletions
diff --git a/tools/regression/pthread/mutex_islocked_np/Makefile b/tools/regression/pthread/mutex_isowned_np/Makefile
index 90e381d..d7d3ac4 100644
--- a/tools/regression/pthread/mutex_islocked_np/Makefile
+++ b/tools/regression/pthread/mutex_isowned_np/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PROG= mutex_islocked_np
+PROG= mutex_isowned_np
NO_MAN=
LDADD= -lpthread
diff --git a/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c b/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
index 5ab7e33..865b426 100644
--- a/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c
+++ b/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
@@ -37,8 +37,8 @@ thread(void *arg)
{
pthread_mutex_t *mtx = arg;
- if (pthread_mutex_islocked_np(mtx) != 0) {
- printf("pthread_mutex_islocked_np() returned non-zero\n"
+ if (pthread_mutex_isowned_np(mtx) != 0) {
+ printf("pthread_mutex_isowned_np() returned non-zero\n"
"for a mutex held by another thread\n");
exit(1);
}
@@ -52,22 +52,22 @@ main(int argc, char *argv[])
pthread_mutex_t mtx;
pthread_mutex_init(&mtx, NULL);
- if (pthread_mutex_islocked_np(&mtx) != 0) {
- printf("pthread_mutex_islocked_np() returned non-zero\n"
+ if (pthread_mutex_isowned_np(&mtx) != 0) {
+ printf("pthread_mutex_isowned_np() returned non-zero\n"
"for a mutex that is not held\n");
exit(1);
}
pthread_mutex_lock(&mtx);
- if (pthread_mutex_islocked_np(&mtx) == 0) {
- printf("pthread_mutex_islocked_np() returned zero\n"
+ if (pthread_mutex_isowned_np(&mtx) == 0) {
+ printf("pthread_mutex_isowned_np() returned zero\n"
"for a mutex we hold ourselves\n");
exit(1);
}
pthread_create(&thr, NULL, thread, &mtx);
pthread_join(thr, NULL);
pthread_mutex_unlock(&mtx);
- if (pthread_mutex_islocked_np(&mtx) != 0) {
- printf("pthread_mutex_islocked_np() returned non-zero\n"
+ if (pthread_mutex_isowned_np(&mtx) != 0) {
+ printf("pthread_mutex_isowned_np() returned non-zero\n"
"for a mutex that is not held\n");
exit(1);
}
OpenPOWER on IntegriCloud