summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-07-31 09:03:36 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-07-31 09:03:36 +0000
commitf782f106dd9b31a25da2f0342c8eb8023c50d6a1 (patch)
treec46fb11f7f04b59dca473bec5f1e28903010b396
parentc970c3739c747fabcb4dac4d1838deeaea99ce35 (diff)
downloadFreeBSD-src-f782f106dd9b31a25da2f0342c8eb8023c50d6a1.zip
FreeBSD-src-f782f106dd9b31a25da2f0342c8eb8023c50d6a1.tar.gz
Set GSBASE for kse. Finally make libkse work on AMD64.
-rw-r--r--lib/libpthread/arch/amd64/include/ksd.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libpthread/arch/amd64/include/ksd.h b/lib/libpthread/arch/amd64/include/ksd.h
index 26725ad..ce2b422 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 <sys/types.h>
+#include <machine/sysarch.h>
+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
OpenPOWER on IntegriCloud