mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Remove some dead code
This commit is contained in:
parent
168d1c157e
commit
73c0faa1b5
66 changed files with 324 additions and 7705 deletions
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
|
||||
// stub version of abort() for low-dependency apps
|
||||
// stub version of abort() to keep the build a dag
|
||||
__attribute__((__noreturn__, __weak__)) void abort(void) {
|
||||
__builtin_trap();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
||||
│ Copyright 2023 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
||||
│ any purpose with or without fee is hereby granted, provided that the │
|
||||
|
@ -16,18 +16,9 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/atomic.h"
|
||||
#include "libc/intrin/atomic.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
privileged void __assert_fail(const char *expr, const char *file, int line) {
|
||||
static atomic_bool once;
|
||||
if (!__assert_disable) {
|
||||
if (!atomic_exchange(&once, true)) {
|
||||
kprintf("%s:%d: assert(%s) failed (tid %P) %m\n", file, line, expr);
|
||||
}
|
||||
__builtin_trap();
|
||||
}
|
||||
// stub version of assert() to keep the build a dag
|
||||
__attribute__((__weak__)) void __assert_fail(const char *expr, const char *file,
|
||||
int line) {
|
||||
__builtin_trap();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue