summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2018-07-04 17:55:32 +0200
committerWaldemar Brodkorb <wbrodkorb@conet.de>2018-08-10 16:02:45 +0200
commiteae96c1e2b02af0554bbae189af2c8091cb581bf (patch)
tree392822d624567e125fabac3074ab8b7317d3846c /libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
parent5b9a9801a4867af70c9ed55379b3eaa3dba59ef3 (diff)
nptl: Disable fork and atfork on MMU-less systems.
They do not work on MMU-less systems. For atfork, implement a hidden function that always returns EPERM. * libpthread/nptl/sysdeps/unix/sysv/linux/fork.c: Disable if __ARCH_USE_MMU__ is not defined. * libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): Handle __ARCH_USE_MMU__. * libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c: Likewise. * libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
index 69e26210f..e958e7137 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
@@ -22,7 +22,7 @@
#include <atomic.h>
#include <tls.h>
-
+#ifdef __ARCH_USE_MMU__
void
__unregister_atfork (
void *dso_handle)
@@ -120,3 +120,11 @@ __unregister_atfork (
deleted = deleted->next;
}
}
+#else
+void
+__unregister_atfork (
+ void *dso_handle)
+{
+ /* Nothing to do. */
+}
+#endif