summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r--lib/libthr/thread/thr_mutex.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index b16cf6e..a3f6c1d 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -40,6 +40,7 @@
#include <sys/param.h>
#include <sys/queue.h>
#include <pthread.h>
+#include <pthread_np.h>
#include "un-namespace.h"
#include "thr_private.h"
@@ -793,8 +794,9 @@ int
_pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count)
{
if (*mutex == NULL)
- return (0);
- return (*mutex)->m_spinloops;
+ return (EINVAL);
+ *count = (*mutex)->m_spinloops;
+ return (0);
}
int
@@ -831,8 +833,9 @@ int
_pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count)
{
if (*mutex == NULL)
- return (0);
- return (*mutex)->m_yieldloops;
+ return (EINVAL);
+ *count = (*mutex)->m_yieldloops;
+ return (0);
}
int
OpenPOWER on IntegriCloud