libxtc 0.4.0
Async concurrency for C: Tokio + Seastar + BEAM, in one library
Loading...
Searching...
No Matches
tail_int.h
1/*-
2 * Copyright (c) 2026, The XTC Project
3 * Use of this source code is governed by the ISC License.
4 *
5 * src/inc/tail_int.h
6 * Internal xtc_tail hook-point primitives. __xtc_tail_emit records
7 * one event from a runtime hook point; __xtc_tail_on reports whether
8 * a source is enabled (so a hook guards extra work). These are
9 * library-internal (the __ prefix) -- consumers use the public
10 * xtc_tail_* API (enable + read/dump/count) in xtc_tail.h and never
11 * call these directly. Split out of xtc_tail.h so no __-prefixed
12 * symbol leaks into an installed public header.
13 */
14
15#ifndef XTC_TAIL_INT_H
16#define XTC_TAIL_INT_H
17
18#include "xtc.h"
19
20/* Record one event from a runtime hook point (proc spawn/exit, etc.).
21 * A no-op fast path (one branch) when `source` is disabled. */
22void __xtc_tail_emit(unsigned source, unsigned kind, xtc_pid_t pid,
23 uint64_t detail);
24
25/* 1 if `source` is currently enabled. A hook point uses this to guard
26 * extra work (e.g. a clock read) so a disabled tail costs one branch
27 * and has no side effects. */
28int __xtc_tail_on(unsigned source);
29
30#endif /* XTC_TAIL_INT_H */