implement pthread_condattr_* interfaces
[musl] / src / thread / pthread_condattr_setclock.c
diff --git a/src/thread/pthread_condattr_setclock.c b/src/thread/pthread_condattr_setclock.c
new file mode 100644 (file)
index 0000000..bf74552
--- /dev/null
@@ -0,0 +1,9 @@
+#include "pthread_impl.h"
+
+int pthread_condattr_setclock(pthread_condattr_t *a, clockid_t clk)
+{
+       if (clk < 0) return EINVAL;
+       *a &= 0x80000000;
+       *a |= clk;
+       return 0;
+}