headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / arch / ppc / asm_offsets.cpp
blob13f69d026930c7d9525a35a506887966c9c2d823
1 /*
2 * Copyright 2007-2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2010 Andreas Faerber, andreas.faerber@web.de
4 * Distributed under the terms of the MIT License.
5 */
7 // This file is used to get C structure offsets into assembly code.
8 // The build system assembles the file and processes the output to create
9 // a header file with macro definitions, that can be included from assembly
10 // code.
13 #include <computed_asm_macros.h>
15 #include <cpu.h>
18 #define DEFINE_MACRO(macro, value) DEFINE_COMPUTED_ASM_MACRO(macro, value)
20 #define DEFINE_OFFSET_MACRO(prefix, structure, member) \
21 DEFINE_MACRO(prefix##_##member, offsetof(struct structure, member));
23 #define DEFINE_SIZEOF_MACRO(prefix, structure) \
24 DEFINE_MACRO(prefix##_sizeof, sizeof(struct structure));
27 void
28 dummy()
30 // struct cpu_ent
31 DEFINE_OFFSET_MACRO(CPU_ENT, cpu_ent, fault_handler);
32 DEFINE_OFFSET_MACRO(CPU_ENT, cpu_ent, fault_handler_stack_pointer);