Message type for SYS_STIME
Change-Id: Ic4401e736bb66960e2ea4b30f5e1946dd93fd76e
This commit is contained in:
parent
1ca0b449b2
commit
9d1ed02a04
4 changed files with 11 additions and 5 deletions
|
@ -338,8 +338,6 @@
|
|||
# define GET_REGS 24 /* get general process registers */
|
||||
# define GET_RUSAGE 25 /* get resource usage */
|
||||
|
||||
#define T_BOOTTIME m4_ll1 /* Boottime in seconds (also for SYS_STIME) */
|
||||
|
||||
/* Field names for SYS_SETTIME. */
|
||||
#define T_SETTIME_NOW m4_l2 /* non-zero for immediate, 0 for adjtime */
|
||||
#define T_CLOCK_ID m4_l3 /* clock to adjust */
|
||||
|
|
|
@ -784,6 +784,13 @@ typedef struct {
|
|||
} mess_lsys_krn_sys_setalarm;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm);
|
||||
|
||||
typedef struct {
|
||||
time_t boot_time;
|
||||
|
||||
uint8_t padding[48];
|
||||
} mess_lsys_krn_sys_stime;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_stime);
|
||||
|
||||
typedef struct {
|
||||
endpoint_t endpt;
|
||||
|
||||
|
@ -1595,6 +1602,7 @@ typedef struct {
|
|||
mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
|
||||
mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
|
||||
mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm;
|
||||
mess_lsys_krn_sys_stime m_lsys_krn_sys_stime;
|
||||
mess_lsys_krn_sys_times m_lsys_krn_sys_times;
|
||||
mess_lsys_krn_sys_umap m_lsys_krn_sys_umap;
|
||||
mess_lsys_krn_sys_vdevio m_lsys_krn_sys_vdevio;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* m_type: SYS_STIME
|
||||
*
|
||||
* The parameters for this kernel call are:
|
||||
* m4_ll1: T_BOOTTIME
|
||||
* m_lsys_krn_sys_stime.boot_time
|
||||
*/
|
||||
|
||||
#include "kernel/system.h"
|
||||
|
@ -14,6 +14,6 @@
|
|||
*===========================================================================*/
|
||||
int do_stime(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
boottime= m_ptr->T_BOOTTIME;
|
||||
boottime = m_ptr->m_lsys_krn_sys_stime.boot_time;
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ time_t boottime; /* New boottime */
|
|||
message m;
|
||||
int r;
|
||||
|
||||
m.T_BOOTTIME = boottime;
|
||||
m.m_lsys_krn_sys_stime.boot_time = boottime;
|
||||
r = _kernel_call(SYS_STIME, &m);
|
||||
return(r);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue