mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
c: add getcontext
debug: make getContext public
This commit is contained in:
parent
f991b9dc05
commit
23d9b59b86
@ -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())
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user