summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
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