summaryrefslogtreecommitdiff
path: root/libgcompat/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgcompat/pthread.c')
-rw-r--r--libgcompat/pthread.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/libgcompat/pthread.c b/libgcompat/pthread.c
index ddfc570..4ebbe6b 100644
--- a/libgcompat/pthread.c
+++ b/libgcompat/pthread.c
@@ -1,15 +1,29 @@
#include <pthread.h>
-int __register_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) {
- return pthread_atfork(prepare, parent, child);
-}
-
-int register_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) __attribute__ ((weak, alias("__register_atfork")));
+#include "alias.h" /* weak_alias */
-
-void __pthread_register_cancel(void *buf) {
+/**
+ * Underlying function for pthread_cleanup_push.
+ */
+void __pthread_register_cancel(void *buf)
+{
}
+/**
+ * Underlying function for pthread_cleanup_push.
+ */
+void __pthread_unregister_cancel(void *buf)
+{
+}
-void __pthread_unregister_cancel(void *buf) {
+/**
+ * Register fork handlers.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---register-atfork.html
+ */
+int __register_atfork(void (*prepare)(void), void (*parent)(void),
+ void (*child)(void), void *__dso_handle)
+{
+ return pthread_atfork(prepare, parent, child);
}
+weak_alias(__register_atfork, register_atfork);