summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_mattr_kind_np.c
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
committerjasone <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
commit03d029f134f6886d414e869610af3f09054ef37e (patch)
treed5f8485897f9957f144321659a45c86542f4d63d /lib/libkse/thread/thr_mattr_kind_np.c
parent548e56c9d24f4f96bf7751d190bf456f023ac145 (diff)
downloadFreeBSD-src-03d029f134f6886d414e869610af3f09054ef37e.zip
FreeBSD-src-03d029f134f6886d414e869610af3f09054ef37e.tar.gz
Add missing man pages. Fix various compliance bugs, mostly having to do with
error return values. Implement pthread_mutexattr_gettype(). PR: docs/16537, docs/17538
Diffstat (limited to 'lib/libkse/thread/thr_mattr_kind_np.c')
-rw-r--r--lib/libkse/thread/thr_mattr_kind_np.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_mattr_kind_np.c b/lib/libkse/thread/thr_mattr_kind_np.c
index 8b3b8cb..1a0832f 100644
--- a/lib/libkse/thread/thr_mattr_kind_np.c
+++ b/lib/libkse/thread/thr_mattr_kind_np.c
@@ -76,4 +76,19 @@ pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
}
return(ret);
}
+
+int
+pthread_mutexattr_gettype(pthread_mutexattr_t *attr, int *type)
+{
+ int ret;
+
+ if (attr == NULL || *attr == NULL || (*attr)->m_type >=
+ MUTEX_TYPE_MAX) {
+ ret = EINVAL;
+ } else {
+ *type = (*attr)->m_type;
+ ret = 0;
+ }
+ return ret;
+}
#endif
OpenPOWER on IntegriCloud