mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 00:31:08 +00:00
2b47727c68
Both htl and nptl uses a different data structure to implement atfork
handlers. The nptl one was refactored by 27761a1042
to use a dynarray
which simplifies the code.
This patch moves the nptl one to be the generic implementation and
replace Hurd linked one. Different than previous NPTL, Hurd also uses
a global lock, so performance should be similar.
Checked on x86_64-linux-gnu, i686-linux-gnu, and with a build for
i686-gnu.
28 lines
1.2 KiB
C
28 lines
1.2 KiB
C
/* 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/>. */
|