diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-07-01 01:39:29 -0400 |
|---|---|---|
| committer | kcbanner <kcbanner@gmail.com> | 2023-07-20 22:58:14 -0400 |
| commit | 23d9b59b868e7f256668535adf9803facf75e538 (patch) | |
| tree | b2f1de77236c0c2fccd9b7711d5726ade27ce6af /lib/std | |
| parent | f991b9dc05706613839743f970a32d516085f182 (diff) | |
| download | zig-23d9b59b868e7f256668535adf9803facf75e538.tar.gz zig-23d9b59b868e7f256668535adf9803facf75e538.zip | |
c: add getcontext
debug: make getContext public
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/c.zig | 2 | ||||
| -rw-r--r-- | lib/std/debug.zig | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig index 149f3ab7e1..94b7f57657 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -413,6 +413,8 @@ pub extern "c" fn timer_delete(timerid: c.timer_t) c_int; pub extern "c" fn timer_settime(timerid: c.timer_t, flags: c_int, new_value: *const c.itimerspec, old_value: *c.itimerspec) c_int; pub extern "c" fn timer_gettime(timerid: c.timer_t, flags: c_int, curr_value: *c.itimerspec) c_int; +pub extern "c" fn getcontext(ucp: *std.os.ucontext_t) c_int; + pub const max_align_t = if (builtin.abi == .msvc) f64 else if (builtin.target.isDarwin()) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index ddef223a02..4905672f21 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -420,7 +420,7 @@ pub fn writeStackTrace( } } -inline fn getContext(context: *StackTraceContext) bool { +pub inline fn getContext(context: *StackTraceContext) bool { if (native_os == .windows) { context.* = std.mem.zeroes(windows.CONTEXT); windows.ntdll.RtlCaptureContext(context); |
