summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/exit.c
blob: 2489ef53a3caec0f933edcc39b7f2e1fd795a277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// See LICENSE for license details.

#include <stdio.h>
#include <stdlib.h>
#include <device.h>

void exit(int status)
{
    poweroff_dev->poweroff(status);
    asm volatile("1: j 1b");
    __builtin_unreachable();
}