Skip to documentation
SLOP

tiny.mprompt.init

Reference tiny.mprompt init

Defined in tiny.mprompt.

Initializes the runtime from cfg, or from the defaults when cfg is null, so a program calls it once before creating any prompt to replace the default configuration.

Called byCallsNo direct callersprivate sourcelib.mprompt.src.promptensureInitializedtiny.mpromptinit
Static calls · unresolved targets: 0 · external targets: 0.

Source

Source: lib/mprompt/src/prompt.zig:457

zig
/// Initializes the runtime from `cfg`, or from the defaults when `cfg` is null, so a program calls/// it once before creating any prompt to replace the default configuration. Only the first/// initialization in a process takes effect: later calls return at once, and the first/// `promptCreate` initializes with the defaults when `init` has not run. Initialization draws the/// guard cookie from the clock and an address. Unless overcommit mode is on, initialization/// installs a fault handler for stack growth and an alternate signal stack of 64 KiB for the/// calling thread. The fault handler takes segmentation faults, and bus faults as well on platforms/// other than Linux. The runtime keeps the fault handler that was installed before, passes it every/// fault it cannot use for stack growth, and aborts the process when there was none. Initialization/// uses plain process globals and no lock, so two threads that initialize at the same time race./// The program stops with a panic when the configuration leaves no usable stack or when a handler/// or signal stack cannot be installed.pub fn init(cfg: ?*const Config) void {    ensureInitialized(cfg);}

Source: lib/mprompt/src/root.zig:78

zig
pub const init = raw.init;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433