6 #ifndef XTF_X86_SYMBOLIC_CONST_H 7 #define XTF_X86_SYMBOLIC_CONST_H 29 #define TOK_OR0(t) (0) 30 #define TOK_OR1(t, x) (t ## x) 31 #define TOK_OR2(t, x, ...) (t ## x | TOK_OR1(t, ##__VA_ARGS__)) 32 #define TOK_OR3(t, x, ...) (t ## x | TOK_OR2(t, ##__VA_ARGS__)) 33 #define TOK_OR4(t, x, ...) (t ## x | TOK_OR3(t, ##__VA_ARGS__)) 34 #define TOK_OR5(t, x, ...) (t ## x | TOK_OR4(t, ##__VA_ARGS__)) 35 #define TOK_OR6(t, x, ...) (t ## x | TOK_OR5(t, ##__VA_ARGS__)) 36 #define TOK_OR7(t, x, ...) (t ## x | TOK_OR6(t, ##__VA_ARGS__)) 37 #define TOK_OR8(t, x, ...) (t ## x | TOK_OR7(t, ##__VA_ARGS__)) 38 #define TOK_OR9(t, x, ...) (t ## x | TOK_OR8(t, ##__VA_ARGS__)) 39 #define TOK_OR10(t, x, ...) (t ## x | TOK_OR9(t, ##__VA_ARGS__)) 40 #define TOK_OR11(t, x, ...) (t ## x | TOK_OR10(t, ##__VA_ARGS__)) 42 #define TOK_OR(t, ...) VAR_MACRO_C1(TOK_OR, t, ##__VA_ARGS__) 58 #define INIT_GDTE_SYM(base, limit, ...) \ 59 INIT_GDTE(base, limit, TOK_OR(SEG_ATTR_, ##__VA_ARGS__)) 64 #define GDTE_SYM(base, limit, ...) \ 65 ((user_desc)INIT_GDTE_SYM(base, limit, __VA_ARGS__)) 80 #define SEL_EC_SYM(sel, ...) (sel | TOK_OR(X86_EC_, ##__VA_ARGS__)) 96 #define EXC_EC_SYM(exc, ...) \ 97 SEL_EC_SYM(((X86_EXC_ ## exc) << 3), IDT, ##__VA_ARGS__) 108 #define PF_SYM(...) TOK_OR(_PAGE_, ##__VA_ARGS__) 119 #define PFEC_SYM(...) TOK_OR(X86_PFEC_, ##__VA_ARGS__) Varadic macro helpers - Here be many dragons.
x86 segment descriptor infrastructure.