about summary refs log tree commit diff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-25 10:51:31 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-25 12:21:12 +0200
commit2c16cb88a6e5ace0fb7cedca86860ea7bde522a7 (patch)
tree8e7aa16a33590ccd27050ef3d3b00607b7f15751 /sysdeps/nptl
parent1a5a653be2f95d4d9485d08672dc5083c74c39d8 (diff)
downloadglibc-2c16cb88a6e5ace0fb7cedca86860ea7bde522a7.tar.gz
glibc-2c16cb88a6e5ace0fb7cedca86860ea7bde522a7.tar.xz
glibc-2c16cb88a6e5ace0fb7cedca86860ea7bde522a7.zip
Linux: Move timer helper routines from librt to libc
This adds several temporary GLIBC_PRIVATE exports.  The symbol names
are changed so that they all start with __timer_.

It is now possible to invoke the fork handler directly, so
pthread_atfork is no longer necessary.  The associated error cannot
happen anymore, and cancellation handling can be removed from
the helper thread routine.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/Makefile2
-rw-r--r--sysdeps/nptl/fork.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/nptl/Makefile b/sysdeps/nptl/Makefile
index 0707f130eb..27aa41af3c 100644
--- a/sysdeps/nptl/Makefile
+++ b/sysdeps/nptl/Makefile
@@ -17,7 +17,7 @@
 # <https://www.gnu.org/licenses/>.
 
 ifeq ($(subdir),rt)
-librt-sysdep_routines += timer_routines
+sysdep_routines += timer_routines
 
 tests += tst-mqueue8x
 CFLAGS-tst-mqueue8x.c += -fexceptions
diff --git a/sysdeps/nptl/fork.h b/sysdeps/nptl/fork.h
index 1fc3a83bd3..8278ab6d11 100644
--- a/sysdeps/nptl/fork.h
+++ b/sysdeps/nptl/fork.h
@@ -20,6 +20,7 @@
 #define _FORK_H
 
 #include <assert.h>
+#include <kernel-posix-timers.h>
 #include <ldsodefs.h>
 #include <list.h>
 #include <mqueue.h>
@@ -44,6 +45,7 @@ fork_system_setup_after_fork (void)
   __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
 
   call_function_static_weak (__mq_notify_fork_subprocess);
+  call_function_static_weak (__timer_fork_subprocess);
 }
 
 /* In case of a fork() call the memory allocation in the child will be