11 wm_trace
, wm_summary
, // watermarks
20 /* Tracing flags currently in effect. */
21 extern unsigned flags
;
24 * Takes a NULLFLAG-terminated list of flag arguments, and return
25 * a bitmask with all those flags set.
27 static inline unsigned bitmask(flag f
, ...) {
28 unsigned mask
= 1 << f
;
32 flag vf
= (flag
)va_arg(vl
, int);
33 if (vf
== NULLFLAG
) break;
41 static inline bool is_set(flag f
) { return (flags
& bitmask(f
, NULLFLAG
)); }
44 * Trace to stderr, conditionned by the activation of the given
47 static inline void trace(flag f
, const char* fmt
, ...) {
51 vfprintf(stderr
, fmt
, vl
);
58 #endif // _GOIR_LOG_HH