aboutsummaryrefslogtreecommitdiff
path: root/lib/libpthread/arch
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2004-08-16 03:27:29 +0000
committerDavid Xu <davidxu@FreeBSD.org>2004-08-16 03:27:29 +0000
commita002d437eaf0d15470bc75c142a22ff3d643b030 (patch)
tree9e58ede141be355c38f2c1cd9f7881b2e6134800 /lib/libpthread/arch
parent497c17e0ae22a367a8edddd9d834e640dd10aca3 (diff)
Notes
Diffstat (limited to 'lib/libpthread/arch')
-rw-r--r--lib/libpthread/arch/alpha/include/pthread_md.h1
-rw-r--r--lib/libpthread/arch/amd64/include/pthread_md.h2
-rw-r--r--lib/libpthread/arch/arm/include/pthread_md.h1
-rw-r--r--lib/libpthread/arch/i386/include/pthread_md.h2
-rw-r--r--lib/libpthread/arch/ia64/include/pthread_md.h1
-rw-r--r--lib/libpthread/arch/powerpc/include/pthread_md.h1
-rw-r--r--lib/libpthread/arch/sparc64/include/pthread_md.h1
7 files changed, 9 insertions, 0 deletions
diff --git a/lib/libpthread/arch/alpha/include/pthread_md.h b/lib/libpthread/arch/alpha/include/pthread_md.h
index 5266a6de0217..908bcfd6a128 100644
--- a/lib/libpthread/arch/alpha/include/pthread_md.h
+++ b/lib/libpthread/arch/alpha/include/pthread_md.h
@@ -34,6 +34,7 @@
#include <ucontext.h>
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_tp.tp_dtv)
#define THR_GETCONTEXT(ucp) _alpha_save_context(&(ucp)->uc_mcontext)
#define THR_SETCONTEXT(ucp) PANIC("THR_SETCONTEXT() now in use!\n")
diff --git a/lib/libpthread/arch/amd64/include/pthread_md.h b/lib/libpthread/arch/amd64/include/pthread_md.h
index 86af4af39a41..4f903c57fd2b 100644
--- a/lib/libpthread/arch/amd64/include/pthread_md.h
+++ b/lib/libpthread/arch/amd64/include/pthread_md.h
@@ -32,12 +32,14 @@
#ifndef _PTHREAD_MD_H_
#define _PTHREAD_MD_H_
+#include <stddef.h>
#include <sys/types.h>
#include <sys/kse.h>
#include <machine/sysarch.h>
#include <ucontext.h>
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_dtv)
#define THR_GETCONTEXT(ucp) \
(void)_amd64_save_context(&(ucp)->uc_mcontext)
diff --git a/lib/libpthread/arch/arm/include/pthread_md.h b/lib/libpthread/arch/arm/include/pthread_md.h
index 2ba486cae3cc..e9d2b6f593e3 100644
--- a/lib/libpthread/arch/arm/include/pthread_md.h
+++ b/lib/libpthread/arch/arm/include/pthread_md.h
@@ -38,6 +38,7 @@
#include <ucontext.h>
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_tp.tp_dtv)
int _thr_setcontext(mcontext_t *, intptr_t, intptr_t *);
int _thr_getcontext(mcontext_t *);
diff --git a/lib/libpthread/arch/i386/include/pthread_md.h b/lib/libpthread/arch/i386/include/pthread_md.h
index 2d4b0e00245b..d208d2ecb686 100644
--- a/lib/libpthread/arch/i386/include/pthread_md.h
+++ b/lib/libpthread/arch/i386/include/pthread_md.h
@@ -31,6 +31,7 @@
#ifndef _PTHREAD_MD_H_
#define _PTHREAD_MD_H_
+#include <stddef.h>
#include <sys/kse.h>
#include <ucontext.h>
@@ -38,6 +39,7 @@ extern int _thr_setcontext(mcontext_t *, intptr_t, intptr_t *);
extern int _thr_getcontext(mcontext_t *);
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_dtv)
#define THR_GETCONTEXT(ucp) _thr_getcontext(&(ucp)->uc_mcontext)
#define THR_SETCONTEXT(ucp) _thr_setcontext(&(ucp)->uc_mcontext, 0, NULL)
diff --git a/lib/libpthread/arch/ia64/include/pthread_md.h b/lib/libpthread/arch/ia64/include/pthread_md.h
index 264909cd586a..220077a4195c 100644
--- a/lib/libpthread/arch/ia64/include/pthread_md.h
+++ b/lib/libpthread/arch/ia64/include/pthread_md.h
@@ -34,6 +34,7 @@
#include <ucontext.h>
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_tp.tp_dtv)
#define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext)
#define THR_SETCONTEXT(ucp) PANIC("THR_SETCONTEXT() now in use!\n")
diff --git a/lib/libpthread/arch/powerpc/include/pthread_md.h b/lib/libpthread/arch/powerpc/include/pthread_md.h
index 776d45b3c869..5d00ab36ba25 100644
--- a/lib/libpthread/arch/powerpc/include/pthread_md.h
+++ b/lib/libpthread/arch/powerpc/include/pthread_md.h
@@ -42,6 +42,7 @@ extern int _ppc32_setcontext(mcontext_t *, intptr_t, intptr_t *);
extern int _ppc32_getcontext(mcontext_t *);
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb.tcb_tp.tp_dtv)
#define THR_GETCONTEXT(ucp) _ppc32_getcontext(&(ucp)->uc_mcontext)
#define THR_SETCONTEXT(ucp) _ppc32_setcontext(&(ucp)->uc_mcontext, 0, NULL)
diff --git a/lib/libpthread/arch/sparc64/include/pthread_md.h b/lib/libpthread/arch/sparc64/include/pthread_md.h
index 4700d73b254d..1abbe653ff31 100644
--- a/lib/libpthread/arch/sparc64/include/pthread_md.h
+++ b/lib/libpthread/arch/sparc64/include/pthread_md.h
@@ -38,6 +38,7 @@
#include <ucontext.h>
#define KSE_STACKSIZE 16384
+#define DTV_OFFSET offsetof(struct tcb, tcb_tp.tp_dtv)
int _thr_setcontext(mcontext_t *, intptr_t, intptr_t *);
int _thr_getcontext(mcontext_t *);