Defines |
#define | do_string2(x) do_string(x) |
| Assert.
|
#define | do_string(x) #x |
#define | assert(X) do { if (!(X)) do_exit("assertion '" #X "' failed in " __FILE__ ":" do_string2(__LINE__) ); } while (0) |
#define | check0(X,...) ({ unsigned __res; if ((__res = (X))) { Logging::printf("%s() line %d: '" #X "' error = %x", __func__, __LINE__, __res); Logging::printf(" " __VA_ARGS__); Logging::printf("\n"); return; }}) |
| Check whether X is true, output an error and return.
|
#define | check1(RET, X,...) ({ unsigned __res; if ((__res = (X))) { Logging::printf("%s() line %d: '" #X "' error = %x", __func__, __LINE__, __res); Logging::printf(" " __VA_ARGS__); Logging::printf("\n"); return RET; }}) |
| Check whether X is true, output an error and return RET.
|
#define | check2(GOTO, X,...) ({ if ((res = (X))) { Logging::printf("%s() line %d: '" #X "' error = %x", __func__, __LINE__, res); Logging::printf(" " __VA_ARGS__); Logging::printf("\n"); goto GOTO; }}) |
| Check whether X is true, output an error and goto RET.
|
#define | asmlinkage_protect(...) __asm__ __volatile__ ("" : : __VA_ARGS__); |
| Make a dependency on the argument, to avoid that the compiler will touch them.
|
Functions |
void * | operator new[] (unsigned size, unsigned alignment) |
| Helper functions.
|
void * | operator new (unsigned size, unsigned alignment) |
void | do_exit (const char *msg) __attribute__((noreturn)) |
unsigned | alloc_cap_region (unsigned count, unsigned align) |
void | dealloc_cap_region (unsigned base, unsigned count) |
Variables |
void *(* | memalloc )(unsigned long size, unsigned long align) |
void(* | memfree )(void *ptr) |
void* operator new[] |
( |
unsigned |
size, |
|
|
unsigned |
alignment | |
|
) |
| | |
Helper functions.
Copyright (C) 2010, Bernhard Kauer <bk@vmmon.org> Economic rights: Technische Universitaet Dresden (Germany)
This file is part of Vancouver.
Vancouver is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Vancouver is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.