summaryrefslogtreecommitdiff
path: root/forward.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-11 23:56:38 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-11 23:56:38 +0200
commit7ad3fdec85ef0b37d2ee1c69c5659d5ebe93f909 (patch)
treeec5f8ff98164067f93449d465bf66e10ed84005d /forward.c
parentc249ebd84f971b158a1a0521bbf7e1261a145755 (diff)
Add dso_handle parameter to __register_atfork
* forward.c (struct atfork): Add dso_handle field. (__register_atfork): Add dso_handle parameter. Store it it dso_handle field. * sysdeps/generic/pt-atfork.c (__dso_handle): New variable. (pthread_atfork): Pass address of __dso_handle to __register_atfork.
Diffstat (limited to 'forward.c')
-rw-r--r--forward.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/forward.c b/forward.c
index 771b3ca..a2139a2 100644
--- a/forward.c
+++ b/forward.c
@@ -147,6 +147,7 @@ struct atfork {
void (*prepare) (void);
void (*parent) (void);
void (*child) (void);
+ void *dso_handle;
struct atfork *prev;
struct atfork *next;
};
@@ -219,7 +220,8 @@ int
__register_atfork (
void (*prepare) (void),
void (*parent) (void),
- void (*child) (void))
+ void (*child) (void),
+ void *dso_handle)
{
struct atfork *new = malloc (sizeof (*new));
if (!new)
@@ -228,6 +230,7 @@ __register_atfork (
new->prepare = prepare;
new->parent = parent;
new->child = child;
+ new->dso_handle = dso_handle;
new->prev = NULL;
__mutex_lock (&atfork_lock);