bzslnx/commondef.h File Reference

#include "lkernel.h"
#include <asm/errno.h>

Include dependency graph for commondef.h:

This graph shows which files directly or indirectly include this file:


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 GUIDLPGUID
typedef GUIDLPCGUID
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 Documentation

#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 (  )     vfree(a)

#define bulk_malloc (  )     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 Documentation

typedef struct _GUID GUID

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 GUID* LPCGUID

typedef GUID* LPGUID

typedef uint64_t ULONGLONG

typedef uint16_t wchar16_t


Function Documentation

static void wcscpy ( wchar16_t dest,
const wchar16_t src 
) [inline, static]

static size_t wcslen ( const wchar16_t pwsz  )  [inline, static]

static void wcsncpy ( wchar16_t dest,
const wchar16_t src,
unsigned  max 
) [inline, static]

SourceForge.net Logo