summaryrefslogtreecommitdiff
path: root/src/user/knob/panic.c
blob: 1ff663c0dc70c36ead01cdbeb8e2bd71e1d342c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <knob/format.h>

#include <pland/syscall.h>
#include <pland/pcrt.h>

#include <stdint.h>

__attribute__ ((noreturn))
void panic(const char *filename, uint32_t line, const char *message) {
  _system_log(format("panic in %s on line %u: %s", filename, line, message));
  __pcrt_quit();
}