#include "lkernel.h"
#include <asm/errno.h>
Classes | |
struct | _GUID |
Defines | |
#define | LK_SUCCESS(st) ((st) >= 0) |
#define | SUCCESS 0 |
#define | __bzslib_extern __attribute__((visibility("hidden"))) |
#define | ptr_from_field(ptr, type, fieldname) ((type *)(((char *)(ptr)) - ((int)&((type *)1)->fieldname - 1))) |
#define | DEBUG |
#define | ASSERT(expression) (void)( (!!(expression)) || (printk("Assertion failed at %s, line %d (%s)\n", __FILE__, __LINE__, #expression))) |
#define | npagednew malloc |
#define | bulk_malloc(a) vmalloc(a) |
#define | bulk_free(a) vfree(a) |
#define | override |
Typedefs | |
typedef int | LKSTATUS |
A typedef for using Exxx error codes. | |
typedef int64_t | LONGLONG |
typedef uint64_t | ULONGLONG |
typedef struct _GUID | GUID |
typedef GUID * | LPGUID |
typedef GUID * | LPCGUID |
typedef uint16_t | wchar16_t |
Functions | |
static size_t | wcslen (const wchar16_t *pwsz) |
static void | wcscpy (wchar16_t *dest, const wchar16_t *src) |
static void | wcsncpy (wchar16_t *dest, const wchar16_t *src, unsigned max) |
#define __bzslib_extern __attribute__((visibility("hidden"))) |
#define ASSERT | ( | expression | ) | (void)( (!!(expression)) || (printk("Assertion failed at %s, line %d (%s)\n", __FILE__, __LINE__, #expression))) |
#define bulk_free | ( | a | ) | vfree(a) |
#define bulk_malloc | ( | a | ) | vmalloc(a) |
#define DEBUG |
#define LK_SUCCESS | ( | st | ) | ((st) >= 0) |
#define npagednew malloc |
#define override |
#define ptr_from_field | ( | ptr, | |||
type, | |||||
fieldname | ) | ((type *)(((char *)(ptr)) - ((int)&((type *)1)->fieldname - 1))) |
#define SUCCESS 0 |
typedef int LKSTATUS |
A typedef for using Exxx error codes.
Functions/methods that return 0 in case of success and -Exxx in case of error should use this type as their return type. This makes such functions very easy to be spotted at a single sight. P.S. Yes, yes, inspired by NTSTATUS. Don't like typedefs? Develop code in hex editor :p
typedef int64_t LONGLONG |
typedef uint64_t ULONGLONG |
typedef uint16_t wchar16_t |
static size_t wcslen | ( | const wchar16_t * | pwsz | ) | [inline, static] |