26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
#pragma once
|
|
// ke_status.h - kernel status codes
|
|
// All fallible kernel functions return KSTATUS.
|
|
// Success is always zero; failures are positive named constants.
|
|
#include <stdint.h>
|
|
|
|
typedef uint32_t KSTATUS;
|
|
|
|
#define STATUS_SUCCESS ((KSTATUS)0x00000000)
|
|
#define STATUS_FAILURE ((KSTATUS)0x00000001)
|
|
#define STATUS_INVALID_PARAMETER ((KSTATUS)0x00000002)
|
|
#define STATUS_NO_MEMORY ((KSTATUS)0x00000003)
|
|
#define STATUS_NOT_FOUND ((KSTATUS)0x00000004)
|
|
#define STATUS_ACCESS_DENIED ((KSTATUS)0x00000005)
|
|
#define STATUS_ALREADY_EXISTS ((KSTATUS)0x00000006)
|
|
#define STATUS_NOT_SUPPORTED ((KSTATUS)0x00000007)
|
|
#define STATUS_TIMEOUT ((KSTATUS)0x00000008)
|
|
#define STATUS_BUFFER_TOO_SMALL ((KSTATUS)0x00000009)
|
|
#define STATUS_DEVICE_ERROR ((KSTATUS)0x0000000A)
|
|
#define STATUS_OBJECT_DEAD ((KSTATUS)0x0000000B)
|
|
#define STATUS_QUEUE_FULL ((KSTATUS)0x0000000C)
|
|
#define STATUS_QUEUE_EMPTY ((KSTATUS)0x0000000D)
|
|
#define STATUS_CHECKSUM_MISMATCH ((KSTATUS)0x0000000E)
|
|
|
|
#define KSUCCESS(s) ((s) == STATUS_SUCCESS)
|