#include <shlib-compat.h>
#include <pthread-functions.h>
#include <libc-lock.h>
-#include <fork.h>
#include <pt-internal.h>
/* Pointers to the libc functions. */
#include <unistd.h>
#include <list.h>
-#include <fork.h>
+#include <register-atfork.h>
#include <dl-sysdep.h>
#include <tls.h>
#include <string.h>
#include <ldsodefs.h>
#include <tls.h>
#include <list.h>
-#include <fork.h>
#include <version.h>
#include <shlib-compat.h>
#include <lowlevellock.h>
hidden_proto (__nptl_create_event)
hidden_proto (__nptl_death_event)
+/* The fork generation counter, defined in libpthread. */
+extern unsigned long int __fork_generation attribute_hidden;
+
+/* Pointer to the fork generation counter in the thread library. */
+extern unsigned long int *__fork_generation_pointer attribute_hidden;
+
/* Register the generation counter in the libpthread with the libc. */
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
extern void __libc_pthread_init (unsigned long int *ptr,
<https://www.gnu.org/licenses/>. */
#include "pthreadP.h"
-#include <fork.h>
+#include <register-atfork.h>
#include <dso_handle.h>
#include <assert.h>
#include <stdlib.h>
#include "exit.h"
-#include <fork.h>
+#include <register-atfork.h>
#include <sysdep.h>
#include <stdint.h>
/* Remove the registered fork handlers. We do not have to
unregister anything if the program is going to terminate anyway. */
-#ifdef UNREGISTER_ATFORK
if (d != NULL)
UNREGISTER_ATFORK (d);
-#endif
__libc_lock_unlock (__exit_funcs_lock);
}
+++ /dev/null
-/* Stub version of header for fork handling. Mainly to handle pthread_atfork
- and friends. Outside dependencies:
-
- UNREGISTER_ATFORK
- If defined it must expand to a function call which takes one void*
- parameter which is the DSO handle for the DSO which gets unloaded.
- The function so called has to remove the atfork handlers registered
- by this module. */
-
-
-/* System specific fork definition. Generic version.
- Copyright (C) 2002-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
+++ /dev/null
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <lowlevellock.h>
-#include <register-atfork.h>
#include <pthread.h>
#include <pt-internal.h>
-#include <fork.h>
#include <dso_handle.h>
#include <register-atfork.h>
#include <stdio-lock.h>
#include <atomic.h>
#include <nptl/pthreadP.h>
-#include <fork.h>
+#include <register-atfork.h>
#include <arch-fork.h>
#include <futex-internal.h>
#include <malloc/malloc-internal.h>
+++ /dev/null
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <lowlevellock.h>
-#include <register-atfork.h>
-
-/* The fork generation counter, defined in libpthread. */
-extern unsigned long int __fork_generation attribute_hidden;
-
-/* Pointer to the fork generation counter in the thread library. */
-extern unsigned long int *__fork_generation_pointer attribute_hidden;
__libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0)
-/* Register handlers to execute before and after `fork'. Note that the
- last parameter is NULL. The handlers registered by the libc are
- never removed so this is OK. */
-extern int __register_atfork (void (*__prepare) (void),
- void (*__parent) (void),
- void (*__child) (void),
- void *__dso_handle);
-
/* Functions that are used by this file and are internal to the GNU C
library. */