Remove some dead code

This commit is contained in:
Justine Tunney 2023-07-03 02:47:05 -07:00
parent 168d1c157e
commit 73c0faa1b5
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
66 changed files with 324 additions and 7705 deletions

View file

@ -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();
}

View file

@ -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();
}