summaryrefslogtreecommitdiff
path: root/test/nptl/libatfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/nptl/libatfork.c')
-rw-r--r--test/nptl/libatfork.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/nptl/libatfork.c b/test/nptl/libatfork.c
new file mode 100644
index 000000000..f4ddca057
--- /dev/null
+++ b/test/nptl/libatfork.c
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#include <pthread.h>
+
+static void atfork_prepare(void)
+{
+ /* nothing to do */
+}
+
+static void atfork_parent(void)
+{
+ /* nothing to do */
+}
+
+static void atfork_child(void)
+{
+ /* nothing to do */
+}
+
+static __attribute__((constructor)) void init(void)
+{
+ pthread_atfork(atfork_prepare, atfork_parent, atfork_child);
+}
+
+static __attribute__((destructor)) void done(void)
+{
+ /* nothing to do */
+}