From ee2d44af054d7211bf3e7213b5fb933f56ac9043 Mon Sep 17 00:00:00 2001 From: David Xu Date: Thu, 31 Jul 2003 09:03:36 +0000 Subject: Set GSBASE for kse. Finally make libkse work on AMD64. --- lib/libpthread/arch/amd64/include/ksd.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/libpthread') diff --git a/lib/libpthread/arch/amd64/include/ksd.h b/lib/libpthread/arch/amd64/include/ksd.h index 26725ad83787..ce2b42260de5 100644 --- a/lib/libpthread/arch/amd64/include/ksd.h +++ b/lib/libpthread/arch/amd64/include/ksd.h @@ -33,6 +33,8 @@ #define _KSD_H_ #include +#include +extern int sysarch(int, void *); struct kse; struct pthread; @@ -124,12 +126,7 @@ _ksd_destroy(struct ksd *ksd) static __inline int _ksd_setprivate(struct ksd *ksd) { - /* - * Make it fail; only the kernel can do this on amd64. - * This interface is going to be removed. The KSD - * will be set by the kernel when the kse is created. - */ - return (-1); + return (sysarch(AMD64_SET_GSBASE, &ksd->base)); } #endif -- cgit v1.3