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/m88k | |
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/m88k')
-rw-r--r-- | lib/libc/arch/m88k/SYS.h | 13 | ||||
-rw-r--r-- | lib/libc/arch/m88k/sys/fork.S | 5 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h index 9d6de9d755e..70292c9d585 100644 --- a/lib/libc/arch/m88k/SYS.h +++ b/lib/libc/arch/m88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.18 2014/06/04 20:13:49 matthew Exp $*/ +/* $OpenBSD: SYS.h,v 1.19 2015/04/07 01:27:06 guenther Exp $*/ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -83,10 +83,16 @@ __ENTRY(p,x); \ __ALIAS(p,x); \ __DO_SYSCALL(y) +#define __SYSCALL_HIDDEN__NOERROR(p,x,y) \ + __ENTRY(p,x); \ + __DO_SYSCALL(y) #define __SYSCALL(p,x,y) \ __SYSCALL__NOERROR(p,x,y); \ br CERROR +#define __SYSCALL_HIDDEN(p,x,y) \ + __SYSCALL_HIDDEN__NOERROR(p,x,y); \ + br CERROR #define __PSEUDO_NOERROR(p,x,y) \ __SYSCALL__NOERROR(p,x,y); \ @@ -97,6 +103,10 @@ __SYSCALL(p,x,y); \ jmp %r1; \ __END(p,x) +#define __PSEUDO_HIDDEN(p,x,y) \ + __SYSCALL_HIDDEN(p,x,y); \ + jmp %r1; \ + __END(p,x) /* * System calls entry points are really named _thread_sys_{syscall}, @@ -105,6 +115,7 @@ */ #define SYSCALL(x) __SYSCALL(_thread_sys_,x,x) #define RSYSCALL(x) __PSEUDO(_thread_sys_,x,x) +#define RSYSCALL_HIDDEN(x) __PSEUDO_HIDDEN(_thread_sys_,x,x) #define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y) #define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(_thread_sys_,x,y) #define SYSENTRY(x) __ENTRY(_thread_sys_,x); \ diff --git a/lib/libc/arch/m88k/sys/fork.S b/lib/libc/arch/m88k/sys/fork.S index 3c88e9f65d0..2c664f74fd2 100644 --- a/lib/libc/arch/m88k/sys/fork.S +++ b/lib/libc/arch/m88k/sys/fork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.S,v 1.8 2013/09/08 18:01:56 miod Exp $ */ +/* $OpenBSD: fork.S,v 1.9 2015/04/07 01:27:06 guenther Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,4 +35,5 @@ #include "SYS.h" -RSYSCALL(fork) +RSYSCALL_HIDDEN(fork) +WEAK_ALIAS(_thread_fork,_thread_sys_fork) |