PM: remove 'boottime' global variable
This commit is contained in:
parent
6da61b8f05
commit
45123f83d3
3 changed files with 7 additions and 10 deletions
|
@ -22,9 +22,6 @@ extern _PROTOTYPE (int (*call_vec[]), (void) ); /* system call handlers */
|
|||
EXTERN sigset_t core_sset; /* which signals cause core images */
|
||||
EXTERN sigset_t ign_sset; /* which signals are by default ignored */
|
||||
|
||||
EXTERN time_t boottime; /* time when the system was booted (for
|
||||
* reporting to FS)
|
||||
*/
|
||||
EXTERN u32_t system_hz; /* System clock frequency. */
|
||||
EXTERN int abort_flag;
|
||||
EXTERN char monitor_code[256];
|
||||
|
|
|
@ -23,10 +23,10 @@ PUBLIC int do_time()
|
|||
* rotates at a constant rate and that such things as leap seconds do not
|
||||
* exist.
|
||||
*/
|
||||
clock_t uptime;
|
||||
clock_t uptime, boottime;
|
||||
int s;
|
||||
|
||||
if ( (s=getuptime(&uptime)) != OK)
|
||||
if ( (s=getuptime2(&uptime, &boottime)) != OK)
|
||||
panic(__FILE__,"do_time couldn't get uptime", s);
|
||||
|
||||
mp->mp_reply.reply_time = (time_t) (boottime + (uptime/system_hz));
|
||||
|
@ -40,10 +40,9 @@ PUBLIC int do_time()
|
|||
PUBLIC int do_stime()
|
||||
{
|
||||
/* Perform the stime(tp) system call. Retrieve the system's uptime (ticks
|
||||
* since boot) and store the time in seconds at system boot in the global
|
||||
* variable 'boottime'.
|
||||
* since boot) and pass the new time in seconds at system boot to the kernel.
|
||||
*/
|
||||
clock_t uptime;
|
||||
clock_t uptime, boottime;
|
||||
int s;
|
||||
|
||||
if (mp->mp_effuid != SUPER_USER) {
|
||||
|
|
|
@ -689,6 +689,7 @@ struct
|
|||
{ "UMAP", SYS_UMAP },
|
||||
{ "VIRCOPY", SYS_VIRCOPY },
|
||||
{ "IRQCTL", SYS_IRQCTL },
|
||||
{ "INT86", SYS_INT86 },
|
||||
{ "DEVIO", SYS_DEVIO },
|
||||
{ "SDEVIO", SYS_SDEVIO },
|
||||
{ "VDEVIO", SYS_VDEVIO },
|
||||
|
@ -700,11 +701,11 @@ struct
|
|||
{ "VSAFECOPY", SYS_VSAFECOPY },
|
||||
{ "SETGRANT", SYS_SETGRANT },
|
||||
{ "READBIOS", SYS_READBIOS },
|
||||
{ "PROFBUF", SYS_PROFBUF },
|
||||
{ "STIME", SYS_STIME },
|
||||
{ "MAPDMA", SYS_MAPDMA },
|
||||
{ "VMCTL", SYS_VMCTL },
|
||||
{ "PROFBUF", SYS_PROFBUF },
|
||||
{ "SYSCTL", SYS_SYSCTL },
|
||||
{ "INT86", SYS_INT86 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue