summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
authorrsc <rsc>2009-05-31 01:12:08 +0000
committerrsc <rsc>2009-05-31 01:12:08 +0000
commit7b644318dd3b17fe5ec0229db956119986082738 (patch)
tree1e60a8628081eb2833a58d73903ff1fd7f6a1bbe /x86.h
parente97519a6d2efd56eb5b5ff2e4c4b20048a33c7af (diff)
downloadxv6-labs-7b644318dd3b17fe5ec0229db956119986082738.tar.gz
xv6-labs-7b644318dd3b17fe5ec0229db956119986082738.tar.bz2
xv6-labs-7b644318dd3b17fe5ec0229db956119986082738.zip
clean up %fs %gs use
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/x86.h b/x86.h
index ecb5d2a..934b9ec 100644
--- a/x86.h
+++ b/x86.h
@@ -104,9 +104,10 @@ xchg(volatile uint *addr, uint newval)
}
static inline void
-setgs(ushort gs)
+loadfsgs(ushort v)
{
- asm volatile("movw %0, %%gs" : : "r" (gs));
+ asm volatile("movw %0, %%fs" : : "r" (v));
+ asm volatile("movw %0, %%gs" : : "r" (v));
}
static inline void