From: Philip Homburg Date: Tue, 7 Aug 2007 12:20:31 +0000 (+0000) Subject: Added do_stime.c, return boot time in do_times.c X-Git-Tag: v3.1.4~348 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch05.html?a=commitdiff_plain;h=fab77fd01fa185a1ad6183d1c33ae828e8e2e57f;p=minix.git Added do_stime.c, return boot time in do_times.c --- diff --git a/kernel/system/Makefile b/kernel/system/Makefile index 68a48ec79..fa1462e30 100644 --- a/kernel/system/Makefile +++ b/kernel/system/Makefile @@ -31,6 +31,7 @@ OBJECTS = \ $(SYSTEM)(do_nice.o) \ $(SYSTEM)(do_times.o) \ $(SYSTEM)(do_setalarm.o) \ + $(SYSTEM)(do_stime.o) \ $(SYSTEM)(do_irqctl.o) \ $(SYSTEM)(do_devio.o) \ $(SYSTEM)(do_vdevio.o) \ @@ -95,6 +96,9 @@ $(SYSTEM)(do_times.o): do_times.c $(SYSTEM)(do_setalarm.o): do_setalarm.c $(CC) do_setalarm.c +$(SYSTEM)(do_stime.o): do_stime.c + $(CC) do_stime.c + $(SYSTEM)(do_irqctl.o): do_irqctl.c $(CC) do_irqctl.c diff --git a/kernel/system/do_stime.c b/kernel/system/do_stime.c new file mode 100644 index 000000000..9b8510f40 --- /dev/null +++ b/kernel/system/do_stime.c @@ -0,0 +1,20 @@ +/* The kernel call implemented in this file: + * m_type: SYS_STIME + * + * The parameters for this kernel call are: + * m2_l1: T_BOOTITME + */ + +#include "../system.h" + +#include + +/*===========================================================================* + * do_stime * + *===========================================================================*/ +PUBLIC int do_stime(m_ptr) +register message *m_ptr; /* pointer to request message */ +{ + boottime= m_ptr->T_BOOTTIME; + return(OK); +} diff --git a/kernel/system/do_times.c b/kernel/system/do_times.c index 12846fd15..36ecf00e9 100644 --- a/kernel/system/do_times.c +++ b/kernel/system/do_times.c @@ -5,6 +5,7 @@ * m4_l1: T_ENDPT (get info for this process) * m4_l1: T_USER_TIME (return values ...) * m4_l2: T_SYSTEM_TIME + * m4_l3: T_BOOTTIME * m4_l5: T_BOOT_TICKS */ @@ -35,6 +36,7 @@ register message *m_ptr; /* pointer to request message */ m_ptr->T_SYSTEM_TIME = rp->p_sys_time; } m_ptr->T_BOOT_TICKS = get_uptime(); + m_ptr->T_BOOTTIME = boottime; return(OK); }