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); }