Remove building with NOCRYPTO option
[minix.git] / minix / usr.bin / trace / type.h
blob750c030b6d349b21afb383d4a39ef454ed4d601f
2 #define COUNT(s) (__arraycount(s))
4 struct call_handler {
5 const char *name;
6 const char *(*namefunc)(const message *m_out);
7 int (*outfunc)(struct trace_proc *proc, const message *m_out);
8 void (*infunc)(struct trace_proc *proc, const message *m_out,
9 const message *m_in, int failed);
11 #define HANDLER(n,o,i) { .name = n, .outfunc = o, .infunc = i }
12 #define HANDLER_NAME(n,o,i) { .namefunc = n, .outfunc = o, .infunc = i }
14 struct calls {
15 endpoint_t endpt;
16 unsigned int base;
17 const struct call_handler *map;
18 unsigned int count;
21 struct flags {
22 unsigned int mask;
23 unsigned int value;
24 const char *name;
26 #define FLAG(f) { f, f, #f }
27 #define FLAG_MASK(m,f) { m, f, #f }
28 #define FLAG_ZERO(f) { ~0, f, #f }
30 /* not great, but it prevents a massive potential for typos.. */
31 #define NAME(r) case r: return #r
32 #define TEXT(v) case v: text = #v; break