From 7ad3fdec85ef0b37d2ee1c69c5659d5ebe93f909 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 11 Sep 2016 23:56:38 +0200 Subject: 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. --- forward.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'forward.c') 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); -- cgit v1.2.3