implement barrier attribute functions (essentially no-ops)
authorRich Felker <dalias@aerifal.cx>
Mon, 7 Mar 2011 20:42:52 +0000 (15:42 -0500)
committerRich Felker <dalias@aerifal.cx>
Mon, 7 Mar 2011 20:42:52 +0000 (15:42 -0500)
src/thread/pthread_barrierattr_destroy.c [new file with mode: 0644]
src/thread/pthread_barrierattr_getpshared.c [new file with mode: 0644]
src/thread/pthread_barrierattr_init.c [new file with mode: 0644]
src/thread/pthread_barrierattr_setpshared.c [new file with mode: 0644]

diff --git a/src/thread/pthread_barrierattr_destroy.c b/src/thread/pthread_barrierattr_destroy.c
new file mode 100644 (file)
index 0000000..adec738
--- /dev/null
@@ -0,0 +1,6 @@
+#include "pthread_impl.h"
+
+int pthread_barrierattr_destroy(pthread_barrierattr_t *a)
+{
+       return 0;
+}
diff --git a/src/thread/pthread_barrierattr_getpshared.c b/src/thread/pthread_barrierattr_getpshared.c
new file mode 100644 (file)
index 0000000..de97076
--- /dev/null
@@ -0,0 +1,7 @@
+#include "pthread_impl.h"
+
+int pthread_barrierattr_getpshared(const pthread_barrierattr_t *a, int *pshared)
+{
+       *pshared = *a;
+       return 0;
+}
diff --git a/src/thread/pthread_barrierattr_init.c b/src/thread/pthread_barrierattr_init.c
new file mode 100644 (file)
index 0000000..f269827
--- /dev/null
@@ -0,0 +1,7 @@
+#include "pthread_impl.h"
+
+int pthread_barrierattr_init(pthread_barrierattr_t *a)
+{
+       memset(a, 0, sizeof *a);
+       return 0;
+}
diff --git a/src/thread/pthread_barrierattr_setpshared.c b/src/thread/pthread_barrierattr_setpshared.c
new file mode 100644 (file)
index 0000000..d6c7f9a
--- /dev/null
@@ -0,0 +1,7 @@
+#include "pthread_impl.h"
+
+int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared)
+{
+       *a = !!pshared;
+       return 0;
+}