Moved basic types to their own headers
This commit is contained in:
@@ -1,15 +1,8 @@
|
|||||||
#ifndef SYSTYPES_H
|
#ifndef SYSTYPES_H
|
||||||
#define SYSTYPES_H
|
#define SYSTYPES_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include "types/physaddr.h"
|
||||||
#include <stddef.h>
|
#include "types/status.h"
|
||||||
|
#include "types/handle.h"
|
||||||
#if defined __i386__ || __arm__
|
|
||||||
typedef uint32_t physaddr_t;
|
|
||||||
#elif defined __x86_64__ || __aarch64__
|
|
||||||
typedef uint64_t physaddr_t;
|
|
||||||
#else
|
|
||||||
typedef uint64_t physaddr_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
8
src/types/handle.h
Normal file
8
src/types/handle.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef HANDLE_H
|
||||||
|
#define HANDLE_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
typedef uint64_t handle_t;
|
||||||
|
|
||||||
|
#endif
|
||||||
15
src/types/physaddr.h
Normal file
15
src/types/physaddr.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#ifndef PHYSADDR_H
|
||||||
|
#define PHYSADDR_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#if defined __i386__ || __arm__
|
||||||
|
typedef uint32_t physaddr_t;
|
||||||
|
#elif defined __x86_64__ || __aarch64__
|
||||||
|
typedef uint64_t physaddr_t;
|
||||||
|
#else
|
||||||
|
typedef uint64_t physaddr_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
11
src/types/status.h
Normal file
11
src/types/status.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef STATUS_H
|
||||||
|
#define STATUS_H
|
||||||
|
|
||||||
|
enum class Status
|
||||||
|
{
|
||||||
|
OK = 0,
|
||||||
|
BadArgument,
|
||||||
|
NoMemory
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user