From ecd14de7d70b8521293511e70a6a5a02cbf6838e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 6 Feb 2008 19:41:05 +0000 Subject: [PATCH] mutex_islocked_np -> mutex_isowned_np --- .../Makefile | 2 +- .../mutex_isowned_np.c} | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) rename tools/regression/pthread/{mutex_islocked_np => mutex_isowned_np}/Makefile (72%) rename tools/regression/pthread/{mutex_islocked_np/mutex_islocked_np.c => mutex_isowned_np/mutex_isowned_np.c} (83%) diff --git a/tools/regression/pthread/mutex_islocked_np/Makefile b/tools/regression/pthread/mutex_isowned_np/Makefile similarity index 72% rename from tools/regression/pthread/mutex_islocked_np/Makefile rename to tools/regression/pthread/mutex_isowned_np/Makefile index 90e381d0adcf..d7d3ac47ca7a 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 similarity index 83% rename from tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c rename to tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c index 5ab7e330cabb..865b426c2c54 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); }