From 29d5de8ad04a737f639e1e49c5045a2ce9132bb2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 3 Apr 2001 18:19:49 +0000 Subject: [PATCH] Make this file C++ safe. It defines many useful functions (inb, outb) that people use from userland in C++ programs. I've had this in my tree for ages and just got bit by it not being in the real tree again. This is a MFC candidate. --- sys/amd64/include/cpufunc.h | 4 ++++ sys/i386/include/cpufunc.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 7f0804f8d70b..40f5bb716f53 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -40,6 +40,9 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ +#include + +__BEGIN_DECLS #define readb(va) (*(volatile u_int8_t *) (va)) #define readw(va) (*(volatile u_int16_t *) (va)) #define readl(va) (*(volatile u_int32_t *) (va)) @@ -544,5 +547,6 @@ u_int rcr3 __P((void)); u_int rcr4 __P((void)); void load_dr6 __P((u_int dr6)); void reset_dbregs __P((void)); +__END_DECLS #endif /* !_MACHINE_CPUFUNC_H_ */ diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 7f0804f8d70b..40f5bb716f53 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -40,6 +40,9 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ +#include + +__BEGIN_DECLS #define readb(va) (*(volatile u_int8_t *) (va)) #define readw(va) (*(volatile u_int16_t *) (va)) #define readl(va) (*(volatile u_int32_t *) (va)) @@ -544,5 +547,6 @@ u_int rcr3 __P((void)); u_int rcr4 __P((void)); void load_dr6 __P((u_int dr6)); void reset_dbregs __P((void)); +__END_DECLS #endif /* !_MACHINE_CPUFUNC_H_ */