Halt draft
This commit is contained in:
parent
3e639fe25d
commit
59d36a7c8e
7 changed files with 24 additions and 2 deletions
9
user/halt.c
Normal file
9
user/halt.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "user.h"
|
||||
|
||||
/** Stops the machine */
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
halt();
|
||||
return 0;
|
||||
}
|
|
@ -74,6 +74,9 @@ int uptime(void);
|
|||
/** trace */
|
||||
int trace(int);
|
||||
|
||||
/** halt */
|
||||
void halt(void);
|
||||
|
||||
/**
|
||||
* Library functions (ulib.c)
|
||||
*/
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue