Reset kernel code + userspace program

This commit is contained in:
Imbus 2025-03-31 19:48:14 +02:00
parent aacb2f8db2
commit 3247689ab2
7 changed files with 28 additions and 2 deletions

10
user/reset.c Normal file
View file

@ -0,0 +1,10 @@
#include "user.h"
/** Reset the machine */
int
main(int argc, char *argv[])
{
printf("System resetting...\n");
reset();
return 0;
}

View file

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

View file

@ -40,6 +40,7 @@ syscalls = [
"uptime",
"trace",
"halt",
"reset",
]
assembly = "\n\n".join(map(genstub, syscalls))