summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2005-04-26 20:41:48 +0000
committerpeter <peter@FreeBSD.org>2005-04-26 20:41:48 +0000
commit408a98eda0a10cadb704be572ff6ebad25db3ddc (patch)
treedf29d44a9fe616941c6e76598d78e91232b12b95 /lib
parent55bba67087a9f496e46e0307aaba162c9a099b0f (diff)
downloadFreeBSD-src-408a98eda0a10cadb704be572ff6ebad25db3ddc.zip
FreeBSD-src-408a98eda0a10cadb704be572ff6ebad25db3ddc.tar.gz
Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, now
that the amd64 kernel implements i386_get/set_gsbase(). All the rest of the ldt backwards compat code should go away soon.
Diffstat (limited to 'lib')
-rw-r--r--lib/libkse/arch/i386/i386/pthread_md.c6
-rw-r--r--lib/libkse/arch/i386/include/pthread_md.h4
-rw-r--r--lib/libpthread/arch/i386/i386/pthread_md.c6
-rw-r--r--lib/libpthread/arch/i386/include/pthread_md.h4
4 files changed, 0 insertions, 20 deletions
diff --git a/lib/libkse/arch/i386/i386/pthread_md.c b/lib/libkse/arch/i386/i386/pthread_md.c
index 96cdac0..acb60f5 100644
--- a/lib/libkse/arch/i386/i386/pthread_md.c
+++ b/lib/libkse/arch/i386/i386/pthread_md.c
@@ -78,10 +78,8 @@ _tcb_dtor(struct tcb *tcb)
struct kcb *
_kcb_ctor(struct kse *kse)
{
-#ifndef COMPAT_32BIT
union descriptor ldt;
void *base;
-#endif
struct kcb *kcb;
int error;
@@ -90,7 +88,6 @@ _kcb_ctor(struct kse *kse)
bzero(kcb, sizeof(struct kcb));
kcb->kcb_self = kcb;
kcb->kcb_kse = kse;
-#ifndef COMPAT_32BIT
switch (_thr_using_setbase) {
case 1: /* use i386_set_gsbase() in _kcb_set */
kcb->kcb_ldt = -1;
@@ -121,7 +118,6 @@ _kcb_ctor(struct kse *kse)
}
break;
}
-#endif
}
return (kcb);
}
@@ -129,11 +125,9 @@ _kcb_ctor(struct kse *kse)
void
_kcb_dtor(struct kcb *kcb)
{
-#ifndef COMPAT_32BIT
if (kcb->kcb_ldt >= 0) {
i386_set_ldt(kcb->kcb_ldt, NULL, 1);
kcb->kcb_ldt = -1; /* just in case */
}
-#endif
free(kcb);
}
diff --git a/lib/libkse/arch/i386/include/pthread_md.h b/lib/libkse/arch/i386/include/pthread_md.h
index e339391..da200d3 100644
--- a/lib/libkse/arch/i386/include/pthread_md.h
+++ b/lib/libkse/arch/i386/include/pthread_md.h
@@ -154,7 +154,6 @@ void _kcb_dtor(struct kcb *);
static __inline void
_kcb_set(struct kcb *kcb)
{
-#ifndef COMPAT_32BIT
int val;
if (_thr_using_setbase == 1) {
@@ -163,9 +162,6 @@ _kcb_set(struct kcb *kcb)
val = (kcb->kcb_ldt << 3) | 7;
__asm __volatile("movl %0, %%gs" : : "r" (val));
}
-#else
- _amd64_set_gsbase(kcb);
-#endif
}
diff --git a/lib/libpthread/arch/i386/i386/pthread_md.c b/lib/libpthread/arch/i386/i386/pthread_md.c
index 96cdac0..acb60f5 100644
--- a/lib/libpthread/arch/i386/i386/pthread_md.c
+++ b/lib/libpthread/arch/i386/i386/pthread_md.c
@@ -78,10 +78,8 @@ _tcb_dtor(struct tcb *tcb)
struct kcb *
_kcb_ctor(struct kse *kse)
{
-#ifndef COMPAT_32BIT
union descriptor ldt;
void *base;
-#endif
struct kcb *kcb;
int error;
@@ -90,7 +88,6 @@ _kcb_ctor(struct kse *kse)
bzero(kcb, sizeof(struct kcb));
kcb->kcb_self = kcb;
kcb->kcb_kse = kse;
-#ifndef COMPAT_32BIT
switch (_thr_using_setbase) {
case 1: /* use i386_set_gsbase() in _kcb_set */
kcb->kcb_ldt = -1;
@@ -121,7 +118,6 @@ _kcb_ctor(struct kse *kse)
}
break;
}
-#endif
}
return (kcb);
}
@@ -129,11 +125,9 @@ _kcb_ctor(struct kse *kse)
void
_kcb_dtor(struct kcb *kcb)
{
-#ifndef COMPAT_32BIT
if (kcb->kcb_ldt >= 0) {
i386_set_ldt(kcb->kcb_ldt, NULL, 1);
kcb->kcb_ldt = -1; /* just in case */
}
-#endif
free(kcb);
}
diff --git a/lib/libpthread/arch/i386/include/pthread_md.h b/lib/libpthread/arch/i386/include/pthread_md.h
index e339391..da200d3 100644
--- a/lib/libpthread/arch/i386/include/pthread_md.h
+++ b/lib/libpthread/arch/i386/include/pthread_md.h
@@ -154,7 +154,6 @@ void _kcb_dtor(struct kcb *);
static __inline void
_kcb_set(struct kcb *kcb)
{
-#ifndef COMPAT_32BIT
int val;
if (_thr_using_setbase == 1) {
@@ -163,9 +162,6 @@ _kcb_set(struct kcb *kcb)
val = (kcb->kcb_ldt << 3) | 7;
__asm __volatile("movl %0, %%gs" : : "r" (val));
}
-#else
- _amd64_set_gsbase(kcb);
-#endif
}
OpenPOWER on IntegriCloud