mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
parent
1c6b5c0acd
commit
38c3fa63fe
14 changed files with 646 additions and 352 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/bits/weaken.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/state.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/lockcmpxchgp.h"
|
||||
|
@ -40,7 +41,7 @@ relegated void __assert_fail(const char *expr, const char *file, int line) {
|
|||
owner = 0;
|
||||
me = sys_gettid();
|
||||
kprintf("%s:%d: assert(%s) failed (tid %d)\n", file, line, expr, me);
|
||||
if (_lockcmpxchgp(&sync, &owner, me)) {
|
||||
if (__vforked || _lockcmpxchgp(&sync, &owner, me)) {
|
||||
__restore_tty();
|
||||
if (weaken(ShowBacktrace)) {
|
||||
weaken(ShowBacktrace)(2, __builtin_frame_address(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue