summaryrefslogtreecommitdiff
path: root/sys/i386/include/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r--sys/i386/include/cpufunc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 307e3d8b2181..6bc01fa46581 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -578,6 +578,22 @@ cpu_critical_exit(critical_t eflags)
write_eflags(eflags);
}
+static __inline register_t
+intr_disable(void)
+{
+ register_t eflags;
+
+ eflags = read_eflags();
+ disable_intr();
+ return (eflags);
+}
+
+static __inline void
+intr_restore(register_t eflags)
+{
+ write_eflags(eflags);
+}
+
#else /* !__GNUC__ */
int breakpoint(void);