aboutsummaryrefslogtreecommitdiff
path: root/libs/kstd/src/libc/stdlib.cpp
blob: a18fed06a3377212e0c3287068058901cfae6009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <kstd/os/error.hpp>

namespace kstd::libc
{

  extern "C"
  {
    [[noreturn]] auto abort() -> void
    {
      kstd::os::abort();
    }

    [[noreturn, gnu::weak]] auto free(void *) -> void
    {
      kstd::os::panic("Tried to call free.");
    }
  }

}  // namespace kstd::libc