Reset kernel code + userspace program
This commit is contained in:
parent
aacb2f8db2
commit
3247689ab2
7 changed files with 28 additions and 2 deletions
10
user/reset.c
Normal file
10
user/reset.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "user.h"
|
||||
|
||||
/** Reset the machine */
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
printf("System resetting...\n");
|
||||
reset();
|
||||
return 0;
|
||||
}
|
|
@ -80,6 +80,9 @@ int trace(int);
|
|||
/** halt */
|
||||
void halt(void);
|
||||
|
||||
/** halt */
|
||||
void reset(void);
|
||||
|
||||
/**
|
||||
* Library functions (ulib.c)
|
||||
*/
|
||||
|
|
|
@ -40,6 +40,7 @@ syscalls = [
|
|||
"uptime",
|
||||
"trace",
|
||||
"halt",
|
||||
"reset",
|
||||
]
|
||||
|
||||
assembly = "\n\n".join(map(genstub, syscalls))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue