From 208b64469ed996e10d0cd3cc85f532c9c89565ee Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <hch@cloudius-systems.com> Date: Tue, 5 Feb 2013 08:05:00 +0100 Subject: [PATCH] make types.hh available to C code --- arch/x64/apic.hh | 2 +- arch/x64/arch-setup.cc | 2 +- arch/x64/exceptions.hh | 2 +- arch/x64/math.cc | 2 +- arch/x64/processor.hh | 2 +- core/mmio.cc | 2 +- drivers/clock.hh | 2 +- drivers/clockevent.hh | 2 +- drivers/device.hh | 2 +- drivers/kvmclock.cc | 2 +- drivers/pci-device.hh | 2 +- drivers/pci-function.hh | 2 +- drivers/pci.hh | 2 +- include/align.hh | 2 +- include/elf.hh | 2 +- include/interrupt.hh | 2 +- include/mmio.hh | 2 +- include/mmu.hh | 2 +- include/{types.hh => osv/types.h} | 7 +++---- include/sglist.hh | 2 +- 20 files changed, 22 insertions(+), 23 deletions(-) rename include/{types.hh => osv/types.h} (73%) diff --git a/arch/x64/apic.hh b/arch/x64/apic.hh index fc958dc11..39414881b 100644 --- a/arch/x64/apic.hh +++ b/arch/x64/apic.hh @@ -1,7 +1,7 @@ #ifndef APIC_HH_ #define APIC_HH_ -#include "types.hh" +#include <osv/types.h> namespace processor { diff --git a/arch/x64/arch-setup.cc b/arch/x64/arch-setup.cc index fe40d1a09..0e79196b4 100644 --- a/arch/x64/arch-setup.cc +++ b/arch/x64/arch-setup.cc @@ -2,7 +2,7 @@ #include "mempool.hh" #include "mmu.hh" #include "processor.hh" -#include "types.hh" +#include <osv/types.h> #include <alloca.h> #include <string.h> diff --git a/arch/x64/exceptions.hh b/arch/x64/exceptions.hh index f3c6c9e7e..72f4c8f99 100644 --- a/arch/x64/exceptions.hh +++ b/arch/x64/exceptions.hh @@ -3,7 +3,7 @@ #include <stdint.h> #include <functional> -#include <types.hh> +#include <osv/types.h> struct exception_frame { ulong r15; diff --git a/arch/x64/math.cc b/arch/x64/math.cc index 6449a4ebe..0697b247e 100644 --- a/arch/x64/math.cc +++ b/arch/x64/math.cc @@ -1,5 +1,5 @@ #include <math.h> -#include "types.hh" +#include <osv/types.h> // FIXME: check for sse4.1 diff --git a/arch/x64/processor.hh b/arch/x64/processor.hh index 86ca5a812..a1dd5e9eb 100644 --- a/arch/x64/processor.hh +++ b/arch/x64/processor.hh @@ -1,7 +1,7 @@ #ifndef ARCH_X86_PROCESSOR_H #define ARCH_X86_PROCESSOR_H -#include "types.hh" +#include <osv/types.h> namespace processor { diff --git a/core/mmio.cc b/core/mmio.cc index 224b95dca..a77b29113 100644 --- a/core/mmio.cc +++ b/core/mmio.cc @@ -1,4 +1,4 @@ -#include "types.hh" +#include <osv/types.h> #include "mmu.hh" #include "mmio.hh" diff --git a/drivers/clock.hh b/drivers/clock.hh index fcac69489..e69de3677 100644 --- a/drivers/clock.hh +++ b/drivers/clock.hh @@ -1,7 +1,7 @@ #ifndef CLOCK_HH_ #define CLOCK_HH_ -#include "types.hh" +#include <osv/types.h> class clock { public: diff --git a/drivers/clockevent.hh b/drivers/clockevent.hh index dd5d54778..8e59f715c 100644 --- a/drivers/clockevent.hh +++ b/drivers/clockevent.hh @@ -1,7 +1,7 @@ #ifndef CLOCKEVENT_HH_ #define CLOCKEVENT_HH_ -#include "types.hh" +#include <osv/types.h> class clock_event_callback { public: diff --git a/drivers/device.hh b/drivers/device.hh index 4fd75662f..3b7c24d78 100644 --- a/drivers/device.hh +++ b/drivers/device.hh @@ -4,7 +4,7 @@ #include <functional> #include <map> -#include "types.hh" +#include <osv/types.h> namespace hw { diff --git a/drivers/kvmclock.cc b/drivers/kvmclock.cc index 7b72db061..128e8c856 100644 --- a/drivers/kvmclock.cc +++ b/drivers/kvmclock.cc @@ -1,6 +1,6 @@ #include "clock.hh" #include "msr.hh" -#include "types.hh" +#include <osv/types.h> #include "mmu.hh" #include "string.h" diff --git a/drivers/pci-device.hh b/drivers/pci-device.hh index e6b698bb7..0aebbc285 100644 --- a/drivers/pci-device.hh +++ b/drivers/pci-device.hh @@ -1,7 +1,7 @@ #ifndef PCI_DEVICE_H #define PCI_DEVICE_H -#include "types.hh" +#include <osv/types.h> #include "pci.hh" #include "pci-function.hh" diff --git a/drivers/pci-function.hh b/drivers/pci-function.hh index efc5db985..9163175ec 100644 --- a/drivers/pci-function.hh +++ b/drivers/pci-function.hh @@ -5,7 +5,7 @@ #include <ostream> #include "mmio.hh" -#include "types.hh" +#include <osv/types.h> #include "processor.hh" #include "debug.hh" #include "device.hh" diff --git a/drivers/pci.hh b/drivers/pci.hh index 9acdce381..9e202cbd5 100644 --- a/drivers/pci.hh +++ b/drivers/pci.hh @@ -30,7 +30,7 @@ #include <stdint.h> #include "pci-function.hh" #include "processor.hh" -#include "types.hh" +#include <osv/types.h> class Driver; diff --git a/include/align.hh b/include/align.hh index 5f29e9711..d5013a30f 100644 --- a/include/align.hh +++ b/include/align.hh @@ -1,7 +1,7 @@ #ifndef ALIGN_HH_ #define ALIGN_HH_ -#include "types.hh" +#include <osv/types.h> template <typename T> T align_down(T n, T alignment) diff --git a/include/elf.hh b/include/elf.hh index 93b45220a..7534ccc10 100644 --- a/include/elf.hh +++ b/include/elf.hh @@ -5,7 +5,7 @@ #include <vector> #include <map> #include <memory> -#include <types.hh> +#include <osv/types.h> namespace elf { typedef u64 Elf64_Addr; diff --git a/include/interrupt.hh b/include/interrupt.hh index 40b6822e7..cb14fc754 100644 --- a/include/interrupt.hh +++ b/include/interrupt.hh @@ -8,7 +8,7 @@ #include "sched.hh" #include "drivers/pci.hh" #include "drivers/pci-function.hh" -#include "types.hh" +#include <osv/types.h> using namespace pci; diff --git a/include/mmio.hh b/include/mmio.hh index 0cf535ecc..8be510fb6 100644 --- a/include/mmio.hh +++ b/include/mmio.hh @@ -1,7 +1,7 @@ #ifndef MMIO_HH #define MMIO_HH -#include "types.hh" +#include <osv/types.h> typedef volatile void* mmioaddr_t; diff --git a/include/mmu.hh b/include/mmu.hh index 80cd1869c..fdfc8d7f1 100644 --- a/include/mmu.hh +++ b/include/mmu.hh @@ -4,7 +4,7 @@ #include "fs/fs.hh" #include <stdint.h> #include <boost/intrusive/set.hpp> -#include <types.hh> +#include <osv/types.h> namespace mmu { typedef uint64_t f_offset; diff --git a/include/types.hh b/include/osv/types.h similarity index 73% rename from include/types.hh rename to include/osv/types.h index 0f7a3d523..aa5111aec 100644 --- a/include/types.hh +++ b/include/osv/types.h @@ -1,8 +1,7 @@ -#ifndef TYPES_HH_ -#define TYPES_HH_ +#ifndef _OSV_TYPES_H_ +#define _OSV_TYPES_H_ 1 #include <stdint.h> -#include <cstdint> typedef uint8_t u8; typedef uint16_t u16; @@ -15,4 +14,4 @@ typedef int64_t s64; typedef unsigned long ulong; -#endif /* TYPES_HH_ */ +#endif /* _OSV_TYPES_H_ */ diff --git a/include/sglist.hh b/include/sglist.hh index 57a69b262..a9424599d 100644 --- a/include/sglist.hh +++ b/include/sglist.hh @@ -2,7 +2,7 @@ #define SGLIST_H #include <list> -#include "types.hh" +#include <osv/types.h> class sglist { public: -- GitLab