Added do_stime.c, return boot time in do_times.c

This commit is contained in:
Philip Homburg 2007-08-07 12:20:31 +00:00
parent 4f787035ea
commit fab77fd01f
3 changed files with 26 additions and 0 deletions

View file

@ -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

20
kernel/system/do_stime.c Normal file
View file

@ -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 <minix/endpoint.h>
/*===========================================================================*
* do_stime *
*===========================================================================*/
PUBLIC int do_stime(m_ptr)
register message *m_ptr; /* pointer to request message */
{
boottime= m_ptr->T_BOOTTIME;
return(OK);
}

View file

@ -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);
}