summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/sparc/SYS.h
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-04-07 01:27:06 +0000
committerguenther <guenther@openbsd.org>2015-04-07 01:27:06 +0000
commit514a545f8a3983d53b7de4e8dfcefe16c9496776 (patch)
treee17cf0966466dfd49a1decf34dd536d3fdbe4765 /lib/libc/arch/sparc/SYS.h
parentDo not mistreat empty arguments to font alternating macros (diff)
downloadwireguard-openbsd-514a545f8a3983d53b7de4e8dfcefe16c9496776.tar.xz
wireguard-openbsd-514a545f8a3983d53b7de4e8dfcefe16c9496776.zip
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/sparc/SYS.h')
-rw-r--r--lib/libc/arch/sparc/SYS.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/arch/sparc/SYS.h b/lib/libc/arch/sparc/SYS.h
index f010285062d..729c386bfaa 100644
--- a/lib/libc/arch/sparc/SYS.h
+++ b/lib/libc/arch/sparc/SYS.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: SYS.h,v 1.16 2014/06/04 20:13:49 matthew Exp $
+ * $OpenBSD: SYS.h,v 1.17 2015/04/07 01:27:07 guenther Exp $
*/
#include <machine/asm.h>
@@ -39,7 +39,8 @@
#define _CAT(x,y) x##y
-#define __ENTRY(p,x) ENTRY(_CAT(p,x)) ; .weak x ; x = _CAT(p,x)
+#define __ENTRY(p,x) ENTRY(_CAT(p,x)) ; .weak x ; x = _CAT(p,x)
+#define __ENTRY_HIDDEN(p,x) ENTRY(_CAT(p,x))
/*
* ERROR branches to cerror.
@@ -71,6 +72,8 @@
*/
#define __SYSCALL(p,x) \
__ENTRY(p,x); mov _CAT(SYS_,x),%g1; t ST_SYSCALL; bcc 1f; nop; ERROR(); 1:
+#define __SYSCALL_HIDDEN(p,x) \
+ __ENTRY_HIDDEN(p,x); mov _CAT(SYS_,x),%g1; t ST_SYSCALL; bcc 1f; nop; ERROR(); 1:
/*
* RSYSCALL is used when the system call should just return. Here
@@ -97,6 +100,7 @@
# define SYSCALL(x) __SYSCALL(_thread_sys_,x)
# define RSYSCALL(x) __RSYSCALL(_thread_sys_,x)
+# define RSYSCALL_HIDDEN(x) __RSYSCALL(_thread_sys_,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)