Message type for SYS_STIME

Change-Id: Ic4401e736bb66960e2ea4b30f5e1946dd93fd76e
This commit is contained in:
Lionel Sambuc 2014-05-22 15:30:51 +02:00
parent 1ca0b449b2
commit 9d1ed02a04
4 changed files with 11 additions and 5 deletions

View file

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

View file

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

View file

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

View file

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