diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-25 10:28:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-25 10:28:07 +0200 |
| commit | 1057fd299e17fcc04f6b3a1aa3ace1026f8652a0 (patch) | |
| tree | a663c7dcd26779295ce0d9681418964f802f2d14 /dev/libDDK/DriverKit/macros.h | |
| parent | 1a32b9307357ac0fc9095e853b2b6d94f9fe62bb (diff) | |
| parent | 328b34360ab8b2462ea5858441693277b3d23f08 (diff) | |
Merge pull request #56 from nekernel-org/dev
Errata: v0.0.4
Diffstat (limited to 'dev/libDDK/DriverKit/macros.h')
| -rw-r--r-- | dev/libDDK/DriverKit/macros.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dev/libDDK/DriverKit/macros.h b/dev/libDDK/DriverKit/macros.h new file mode 100644 index 00000000..9b7b3d50 --- /dev/null +++ b/dev/libDDK/DriverKit/macros.h @@ -0,0 +1,48 @@ +/* ------------------------------------------- + + Copyright 2025 Amlal El Mahrouss. + + FILE: ddk.h + PURPOSE: DDK Driver model base header. + +------------------------------------------- */ + +#pragma once + +#include <stddef.h> +#include <stdint.h> + +#if defined(__cplusplus) +#define BOOL bool +#define YES true +#define NO false +#define DDK_EXTERN extern "C" __declspec(dllexport) +#define nil nullptr +#undef NULL +#define NULL 0 +#define DDK_FINAL final +#else +#define BOOL char +#define YES 1 +#define NO 0 +#define DDK_EXTERN extern __declspec(dllexport) +#define nil ((void*) 0) +#undef NULL +#define NULL ((void*) 0) +#define DDK_FINAL +#endif // defined(__cplusplus) + +#ifndef __DDK__ +#undef DDK_EXTERN +#if defined(__cplusplus) +#define DDK_EXTERN extern "C" __declspec(dllimport) +#else +#define DDK_EXTERN __declspec(dllimport) +#endif +#endif + +#define ATTRIBUTE(X) __attribute__((X)) + +#ifndef __NEOSKRNL__ +#error !!! Do not include header in EL0/Ring 3 mode !!! +#endif // __NEOSKRNL__
\ No newline at end of file |
