summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/configure2
-rw-r--r--sysdeps/mach/configure.ac (renamed from sysdeps/mach/configure.in)0
-rw-r--r--sysdeps/mach/hurd/configure2
-rw-r--r--sysdeps/mach/hurd/configure.ac (renamed from sysdeps/mach/hurd/configure.in)0
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.h7
-rw-r--r--sysdeps/mach/hurd/fork.c15
-rw-r--r--sysdeps/mach/hurd/i386/tls.h1
7 files changed, 24 insertions, 3 deletions
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index 3af372560f..61ac7d9684 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -65,7 +65,7 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_preproc
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
diff --git a/sysdeps/mach/configure.in b/sysdeps/mach/configure.ac
index db85f47eae..db85f47eae 100644
--- a/sysdeps/mach/configure.in
+++ b/sysdeps/mach/configure.ac
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 84948a549c..a0f97217e9 100644
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -1,4 +1,4 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
$as_echo "#define NO_HIDDEN 1" >>confdefs.h
diff --git a/sysdeps/mach/hurd/configure.in b/sysdeps/mach/hurd/configure.ac
index ad915a568b..ad915a568b 100644
--- a/sysdeps/mach/hurd/configure.in
+++ b/sysdeps/mach/hurd/configure.ac
diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h
index 52563b0ca0..0e7cac4ab0 100644
--- a/sysdeps/mach/hurd/dl-sysdep.h
+++ b/sysdeps/mach/hurd/dl-sysdep.h
@@ -29,3 +29,10 @@
# define DL_ARGV_NOT_RELRO 1
# define LIBC_STACK_END_NOT_RELRO 1
#endif
+
+#include <signal.h>
+inline void _dl_mask_all_signals (sigset_t *) internal_function;
+inline void _dl_mask_all_signals (sigset_t *) { }
+
+inline void _dl_unmask_all_signals (sigset_t *) internal_function;
+inline void _dl_unmask_all_signals (sigset_t *) { }
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index ab11babffe..321421fbbc 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -34,6 +34,11 @@
symbol_set_declare (_hurd_fork_locks)
+/* Application callbacks registered through pthread_atfork. */
+DEFINE_HOOK (_hurd_atfork_prepare_hook, (void));
+DEFINE_HOOK (_hurd_atfork_child_hook, (void));
+DEFINE_HOOK (_hurd_atfork_parent_hook, (void));
+
/* Things that want to be called before we fork, to prepare the parent for
task_create, when the new child task will inherit our address space. */
DEFINE_HOOK (_hurd_fork_prepare_hook, (void));
@@ -62,6 +67,8 @@ __fork (void)
error_t err;
struct hurd_sigstate *volatile ss;
+ RUN_HOOK (_hurd_atfork_prepare_hook, ());
+
ss = _hurd_self_sigstate ();
__spin_lock (&ss->critical_section_lock);
@@ -695,6 +702,14 @@ __fork (void)
_hurd_critical_section_unlock (ss);
+ if (!err)
+ {
+ if (pid != 0)
+ RUN_HOOK (_hurd_atfork_parent_hook, ());
+ else
+ RUN_HOOK (_hurd_atfork_child_hook, ());
+ }
+
return err ? __hurd_fail (err) : pid;
}
libc_hidden_def (__fork)
diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index 4f4c7c5df1..da8c16aa00 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -118,7 +118,6 @@ _hurd_tls_init (tcbhead_t *tcb, int secondcall)
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(descr, secondcall) \
_hurd_tls_init ((tcbhead_t *) (descr), (secondcall))
-# define TLS_INIT_TP_EXPENSIVE 1
/* Return the TCB address of the current thread. */
# define THREAD_SELF \