diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-04-07 01:27:08 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-04-07 01:27:08 +0000 |
commit | 88c62139002b1fec001c04b3594a04d1bbfb1342 (patch) | |
tree | 0509c1476b98d3b86a67ed3837dd2dd5f29944de /lib/libc/arch/hppa64 | |
parent | 1e37072b7b75ac23dc21e9d893b197aab716875c (diff) |
Make pthread_atfork() track the DSO that called it like atexit() does,
unregistering callbacks if the DSO is unloaded. Move the callback
handling from libpthread to libc, though libpthread still overrides the
inner call to handle locking and thread-library reinitialization.
Major version bump for both libc and libpthread.
verification that this fixes various ports ajacoutot@
asm assistance miod@; ok millert@ deraadt@
Diffstat (limited to 'lib/libc/arch/hppa64')
-rw-r--r-- | lib/libc/arch/hppa64/SYS.h | 13 | ||||
-rw-r--r-- | lib/libc/arch/hppa64/sys/fork.S | 5 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/libc/arch/hppa64/SYS.h b/lib/libc/arch/hppa64/SYS.h index d60f389285d..510ab2c5fba 100644 --- a/lib/libc/arch/hppa64/SYS.h +++ b/lib/libc/arch/hppa64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.6 2011/09/19 13:01:28 kettenis Exp $ */ +/* $OpenBSD: SYS.h,v 1.7 2015/04/07 01:27:06 guenther Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -36,6 +36,8 @@ #define SYSENTRY(x) !\ LEAF_ENTRY(__CONCAT(_thread_sys_,x)) !\ WEAK_ALIAS(x,__CONCAT(_thread_sys_,x)) +#define SYSENTRY_HIDDEN(x) !\ +LEAF_ENTRY(__CONCAT(_thread_sys_,x)) #define SYSEXIT(x) !\ EXIT(__CONCAT(_thread_sys_,x)) @@ -56,6 +58,12 @@ SYSENTRY(x) !\ bv %r0(%rp) !\ nop !\ SYSEXIT(x) +#define PSEUDO_HIDDEN(x,y) !\ +SYSENTRY_HIDDEN(x) !\ + SYSCALL(y) !\ + bv %r0(%rp) !\ + nop !\ +SYSEXIT(x) #define PSEUDO_NOERROR(x,y) !\ SYSENTRY(x) !\ @@ -69,5 +77,6 @@ SYSENTRY(x) !\ nop !\ SYSEXIT(x) -#define RSYSCALL(x) PSEUDO(x,x) +#define RSYSCALL(x) PSEUDO(x,x) +#define RSYSCALL_HIDDEN(x) PSEUDO_HIDDEN(x,x) diff --git a/lib/libc/arch/hppa64/sys/fork.S b/lib/libc/arch/hppa64/sys/fork.S index ce870ec4024..7602c801601 100644 --- a/lib/libc/arch/hppa64/sys/fork.S +++ b/lib/libc/arch/hppa64/sys/fork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.S,v 1.5 2015/03/31 04:32:01 guenther Exp $ */ +/* $OpenBSD: fork.S,v 1.6 2015/04/07 01:27:06 guenther Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -28,4 +28,5 @@ #include "SYS.h" -RSYSCALL(fork) +RSYSCALL_HIDDEN(fork) +WEAK_ALIAS(_thread_fork,_thread_sys_fork) |