summaryrefslogtreecommitdiff
path: root/src/boot/assert.c
blob: fa206fc36046035ea9a2e32bb7d12e5ad552cd09 (plain)
1
2
3
4
5
6
7
8
9
#include "global.h"

NORETURN void __assert(const char* assertion, const char* file, int line) {
    char msg[256];

    osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", assertion, file, line, osGetThreadId(NULL));
    sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
    Fault_AddHungupAndCrashImpl(msg, assertion);
}