aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/x86_64')
-rw-r--r--nptl/sysdeps/x86_64/Makefile21
-rw-r--r--nptl/sysdeps/x86_64/tcb-offsets.sym6
-rw-r--r--nptl/sysdeps/x86_64/tls.h2
3 files changed, 29 insertions, 0 deletions
diff --git a/nptl/sysdeps/x86_64/Makefile b/nptl/sysdeps/x86_64/Makefile
new file mode 100644
index 0000000000..24990a2b7e
--- /dev/null
+++ b/nptl/sysdeps/x86_64/Makefile
@@ -0,0 +1,21 @@
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/nptl/sysdeps/x86_64/tcb-offsets.sym b/nptl/sysdeps/x86_64/tcb-offsets.sym
new file mode 100644
index 0000000000..046ad5bee8
--- /dev/null
+++ b/nptl/sysdeps/x86_64/tcb-offsets.sym
@@ -0,0 +1,6 @@
+#include <sysdep.h>
+#include <tls.h>
+
+SELF offsetof (tcbhead_t, self)
+CLEANUP offsetof (struct pthread, cleanup)
+CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev)
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 66ae0f3f07..69c8bc52e6 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -42,6 +42,8 @@ typedef struct
dtv_t *dtv;
void *self; /* Pointer to the thread descriptor. */
} tcbhead_t;
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
#endif