summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_emuldata.h
diff options
context:
space:
mode:
authorpirofti <pirofti@openbsd.org>2011-04-05 15:44:40 +0000
committerpirofti <pirofti@openbsd.org>2011-04-05 15:44:40 +0000
commit3595609c45e61ad71974f17cd71ac52905aef42c (patch)
treef0e0cf6790fa13a8c9f90fe1d95cbfc870ceda03 /sys/compat/linux/linux_emuldata.h
parentBye bye, kern.emul.freebsd (diff)
downloadwireguard-openbsd-3595609c45e61ad71974f17cd71ac52905aef42c.tar.xz
wireguard-openbsd-3595609c45e61ad71974f17cd71ac52905aef42c.zip
Add set_tid_address() syscall. Lots of help from and okay guenther@.
This is more than a simple syscall.This expands TLS support quite a bit. Also linux_sys_clone() handles CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID, CLONE_PARENT_SETTID flags as well as the CLONE_SETTLS by doing what set_thread_area() is doing. Next on the list is futex support which should allow compat to cope with newer Linux kernels.
Diffstat (limited to 'sys/compat/linux/linux_emuldata.h')
-rw-r--r--sys/compat/linux/linux_emuldata.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_emuldata.h b/sys/compat/linux/linux_emuldata.h
index 316a9816ed4..4eb541081d4 100644
--- a/sys/compat/linux/linux_emuldata.h
+++ b/sys/compat/linux/linux_emuldata.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_emuldata.h,v 1.4 2008/06/26 05:42:14 ray Exp $ */
+/* $OpenBSD: linux_emuldata.h,v 1.5 2011/04/05 15:44:40 pirofti Exp $ */
/* $NetBSD: linux_emuldata.h,v 1.4 2002/02/15 16:48:02 christos Exp $ */
/*-
* Copyright (c) 1998,2002 The NetBSD Foundation, Inc.
@@ -39,5 +39,14 @@
*/
struct linux_emuldata {
caddr_t p_break; /* Cached per-process break value */
+
+ void *child_set_tid; /* Let the child set the thread ID at start */
+ void *child_clear_tid; /* Let the child clear the thread ID on exit */
+ unsigned child_tls_base;/* Set the Thread Local Storage on clone */
+
+ /* Same as above, passed by the parent when forking. */
+ void *my_set_tid;
+ void *my_clear_tid;
+ unsigned my_tls_base;
};
#endif /* !_LINUX_EMULDATA_H */