summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-08-31 16:43:41 -0400
committerAustin Clements <[email protected]>2010-08-31 16:43:41 -0400
commit92639b6ba95d1d960a9e808c7163f6d171b2e4a3 (patch)
tree4aaf1bbbb0ba14ff4e3621f89ea33f43139ab226 /x86.h
parent37ee75f42e9d35a96b84fe0c95479178cd41efac (diff)
downloadxv6-labs-92639b6ba95d1d960a9e808c7163f6d171b2e4a3.tar.gz
xv6-labs-92639b6ba95d1d960a9e808c7163f6d171b2e4a3.tar.bz2
xv6-labs-92639b6ba95d1d960a9e808c7163f6d171b2e4a3.zip
Follow xv6 code style. Also fixes indexing for these functions
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/x86.h b/x86.h
index 71427b3..1f903b2 100644
--- a/x86.h
+++ b/x86.h
@@ -132,7 +132,8 @@ sti(void)
asm volatile("sti");
}
-static inline void nop_pause(void)
+static inline void
+nop_pause(void)
{
asm volatile("pause" : :);
}
@@ -151,31 +152,36 @@ xchg(volatile uint *addr, uint newval)
return result;
}
-static inline void lcr0(uint val)
+static inline void
+lcr0(uint val)
{
asm volatile("movl %0,%%cr0" : : "r" (val));
}
-static inline uint rcr0(void)
+static inline uint
+rcr0(void)
{
uint val;
asm volatile("movl %%cr0,%0" : "=r" (val));
return val;
}
-static inline uint rcr2(void)
+static inline uint
+rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
return val;
}
-static inline void lcr3(uint val)
+static inline void
+lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
}
-static inline uint rcr3(void)
+static inline uint
+rcr3(void)
{
uint val;
asm volatile("movl %%cr3,%0" : "=r" (val));