syslib: implement sys_reboot()

Change-Id: Ia604e3d57dbcdc25c96c1aa0a263384982311d09
This commit is contained in:
Thomas Cort 2013-08-02 10:10:39 -04:00
parent 09db2a8c67
commit dd56292f65
3 changed files with 13 additions and 0 deletions

View File

@ -67,6 +67,7 @@ int sys_vmctl_get_memreq(endpoint_t *who, vir_bytes *mem, vir_bytes
int sys_vmctl_enable_paging(void * data);
int sys_readbios(phys_bytes address, void *buf, size_t size);
int sys_reboot(int how);
int sys_settime(int now, clockid_t clk_id, time_t sec, long nsec);
int sys_stime(time_t boottime);
int sys_sysctl(int ctl, char *arg1, int arg2);

View File

@ -52,6 +52,7 @@ SRCS+= \
sys_physcopy.c \
sys_privctl.c \
sys_profbuf.c \
sys_reboot.c \
sys_runctl.c \
sys_safecopy.c \
sys_safememset.c \

11
lib/libsys/sys_reboot.c Normal file
View File

@ -0,0 +1,11 @@
#include "syslib.h"
int
sys_reboot(int how)
{
message m;
m.m1_i1 = how;
return _taskcall(PM_PROC_NR, REBOOT, &m);
}