Halt draft

This commit is contained in:
Imbus 2024-08-09 07:58:00 +02:00
parent 3e639fe25d
commit 59d36a7c8e
7 changed files with 24 additions and 2 deletions

9
user/halt.c Normal file
View file

@ -0,0 +1,9 @@
#include "user.h"
/** Stops the machine */
int
main(int argc, char *argv[])
{
halt();
return 0;
}

View file

@ -74,6 +74,9 @@ int uptime(void);
/** trace */
int trace(int);
/** halt */
void halt(void);
/**
* Library functions (ulib.c)
*/

View file

@ -14,7 +14,7 @@ sub entry {
print " ecall\n";
print " ret\n";
}
entry("fork");
entry("exit");
entry("wait");
@ -37,3 +37,4 @@ entry("sbrk");
entry("sleep");
entry("uptime");
entry("trace");
entry("halt");