summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/x86.h b/x86.h
index cc809e7..ee7e6ce 100644
--- a/x86.h
+++ b/x86.h
@@ -29,6 +29,8 @@ static __inline uint32_t read_ebp(void) __attribute__((always_inline));
static __inline uint32_t read_esp(void) __attribute__((always_inline));
static __inline void cpuid(uint32_t info, uint32_t *eaxp, uint32_t *ebxp, uint32_t *ecxp, uint32_t *edxp);
static __inline uint64_t read_tsc(void) __attribute__((always_inline));
+static __inline void cli(void) __attribute__((always_inline));
+static __inline void sti(void) __attribute__((always_inline));
static __inline void
breakpoint(void)
@@ -304,6 +306,18 @@ read_tsc(void)
return tsc;
}
+static __inline void
+cli(void)
+{
+ __asm__ volatile("cli");
+}
+
+static __inline void
+sti(void)
+{
+ __asm__ volatile("sti");
+}
+
struct PushRegs {
/* registers as pushed by pusha */
uint32_t reg_edi;