mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g Reviewed by: bde
This commit is contained in:
parent
0e1e9fdca6
commit
c21410e119
25 changed files with 101 additions and 101 deletions
|
|
@ -30,7 +30,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: exception.s,v 1.50 1998/04/15 11:10:28 bde Exp $
|
||||
* $Id: exception.s,v 1.51 1998/04/17 22:36:27 des Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
|
|
@ -346,7 +346,7 @@ ENTRY(fork_trampoline)
|
|||
movl _curproc,%eax
|
||||
addl $P_RUNTIME,%eax
|
||||
pushl %eax
|
||||
call _microruntime
|
||||
call _microuptime
|
||||
popl %eax
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: exception.s,v 1.50 1998/04/15 11:10:28 bde Exp $
|
||||
* $Id: exception.s,v 1.51 1998/04/17 22:36:27 des Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
|
|
@ -346,7 +346,7 @@ ENTRY(fork_trampoline)
|
|||
movl _curproc,%eax
|
||||
addl $P_RUNTIME,%eax
|
||||
pushl %eax
|
||||
call _microruntime
|
||||
call _microuptime
|
||||
popl %eax
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.36 1998/04/04 18:56:54 phk Exp $
|
||||
* $Id: linux_misc.c,v 1.37 1998/04/06 08:26:01 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -694,7 +694,7 @@ linux_times(struct proc *p, struct linux_times_args *args)
|
|||
sizeof(struct linux_times_argv))))
|
||||
return error;
|
||||
|
||||
microruntime(&tv);
|
||||
microuptime(&tv);
|
||||
p->p_retval[0] = (int)CONVTCK(tv);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $
|
||||
* $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
|
@ -1031,7 +1031,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
scrn_blank_time = *(int *)data;
|
||||
if (scrn_blank_time == 0)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
|
||||
case CONS_CURSORTYPE: /* set cursor type blink/noblink */
|
||||
|
|
@ -1386,7 +1386,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
}
|
||||
/* make screensaver happy */
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2351,7 +2351,7 @@ scrn_timer(void *arg)
|
|||
}
|
||||
|
||||
/* should we stop the screen saver? */
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if (panicstr)
|
||||
scrn_time_stamp = tv;
|
||||
if (tv.tv_sec <= scrn_time_stamp.tv_sec + scrn_blank_time)
|
||||
|
|
@ -2480,7 +2480,7 @@ static void
|
|||
stop_scrn_saver(void (*saver)(int))
|
||||
{
|
||||
(*saver)(FALSE);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
mark_all(cur_console);
|
||||
wakeup((caddr_t)&scrn_blanked);
|
||||
}
|
||||
|
|
@ -2490,10 +2490,10 @@ wait_scrn_saver_stop(void)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
while (scrn_blanked > 0) {
|
||||
error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
if (error != ERESTART)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3153,7 +3153,7 @@ ansi_put(scr_stat *scp, u_char *buf, int len)
|
|||
|
||||
/* make screensaver happy */
|
||||
if (scp == cur_console)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
write_in_progress++;
|
||||
outloop:
|
||||
|
|
@ -3621,7 +3621,7 @@ next_code:
|
|||
|
||||
/* make screensaver happy */
|
||||
if (!(scancode & 0x80))
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
if (!(flags & SCGETC_CN)) {
|
||||
/* do the /dev/random device a favour */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: msdosfs_denode.c,v 1.34 1998/03/26 20:52:51 phk Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.35 1998/04/04 13:25:55 phk Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
|
|
@ -346,7 +346,7 @@ deget(pmp, dirclust, diroffset, depp)
|
|||
}
|
||||
} else
|
||||
nvp->v_type = VREG;
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
SETHIGH(ldep->de_modrev, tv.tv_sec);
|
||||
SETLOW(ldep->de_modrev, tv.tv_usec * 4294);
|
||||
VREF(ldep->de_devvp);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: exception.s,v 1.50 1998/04/15 11:10:28 bde Exp $
|
||||
* $Id: exception.s,v 1.51 1998/04/17 22:36:27 des Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
|
|
@ -346,7 +346,7 @@ ENTRY(fork_trampoline)
|
|||
movl _curproc,%eax
|
||||
addl $P_RUNTIME,%eax
|
||||
pushl %eax
|
||||
call _microruntime
|
||||
call _microuptime
|
||||
popl %eax
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: asnames.h,v 1.19 1998/04/06 15:33:02 peter Exp $
|
||||
* $Id: asnames.h,v 1.20 1998/04/22 09:46:16 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_ASNAMES_H_
|
||||
|
|
@ -243,7 +243,7 @@
|
|||
#define _get_isrlock get_isrlock
|
||||
#define _get_mplock get_mplock
|
||||
#define _get_syscall_lock get_syscall_lock
|
||||
#define _getmicroruntime getmicroruntime
|
||||
#define _getmicrouptime getmicrouptime
|
||||
#define _idqs idqs
|
||||
#define _imen imen
|
||||
#define _imen_lock imen_lock
|
||||
|
|
@ -272,7 +272,7 @@
|
|||
#define _main main
|
||||
#define _mask8254 mask8254
|
||||
#define _maskRTC maskRTC
|
||||
#define _microruntime microruntime
|
||||
#define _microuptime microuptime
|
||||
#define _mp_gdtbase mp_gdtbase
|
||||
#define _mp_lock mp_lock
|
||||
#define _mp_ncpus mp_ncpus
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $
|
||||
* $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
|
@ -1031,7 +1031,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
scrn_blank_time = *(int *)data;
|
||||
if (scrn_blank_time == 0)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
|
||||
case CONS_CURSORTYPE: /* set cursor type blink/noblink */
|
||||
|
|
@ -1386,7 +1386,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
}
|
||||
/* make screensaver happy */
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2351,7 +2351,7 @@ scrn_timer(void *arg)
|
|||
}
|
||||
|
||||
/* should we stop the screen saver? */
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if (panicstr)
|
||||
scrn_time_stamp = tv;
|
||||
if (tv.tv_sec <= scrn_time_stamp.tv_sec + scrn_blank_time)
|
||||
|
|
@ -2480,7 +2480,7 @@ static void
|
|||
stop_scrn_saver(void (*saver)(int))
|
||||
{
|
||||
(*saver)(FALSE);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
mark_all(cur_console);
|
||||
wakeup((caddr_t)&scrn_blanked);
|
||||
}
|
||||
|
|
@ -2490,10 +2490,10 @@ wait_scrn_saver_stop(void)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
while (scrn_blanked > 0) {
|
||||
error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
if (error != ERESTART)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3153,7 +3153,7 @@ ansi_put(scr_stat *scp, u_char *buf, int len)
|
|||
|
||||
/* make screensaver happy */
|
||||
if (scp == cur_console)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
write_in_progress++;
|
||||
outloop:
|
||||
|
|
@ -3621,7 +3621,7 @@ next_code:
|
|||
|
||||
/* make screensaver happy */
|
||||
if (!(scancode & 0x80))
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
if (!(flags & SCGETC_CN)) {
|
||||
/* do the /dev/random device a favour */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.36 1998/04/04 18:56:54 phk Exp $
|
||||
* $Id: linux_misc.c,v 1.37 1998/04/06 08:26:01 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -694,7 +694,7 @@ linux_times(struct proc *p, struct linux_times_args *args)
|
|||
sizeof(struct linux_times_argv))))
|
||||
return error;
|
||||
|
||||
microruntime(&tv);
|
||||
microuptime(&tv);
|
||||
p->p_retval[0] = (int)CONVTCK(tv);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.259 1998/04/16 09:41:55 des Exp $
|
||||
* $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
|
@ -1031,7 +1031,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
scrn_blank_time = *(int *)data;
|
||||
if (scrn_blank_time == 0)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
|
||||
case CONS_CURSORTYPE: /* set cursor type blink/noblink */
|
||||
|
|
@ -1386,7 +1386,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
}
|
||||
/* make screensaver happy */
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2351,7 +2351,7 @@ scrn_timer(void *arg)
|
|||
}
|
||||
|
||||
/* should we stop the screen saver? */
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if (panicstr)
|
||||
scrn_time_stamp = tv;
|
||||
if (tv.tv_sec <= scrn_time_stamp.tv_sec + scrn_blank_time)
|
||||
|
|
@ -2480,7 +2480,7 @@ static void
|
|||
stop_scrn_saver(void (*saver)(int))
|
||||
{
|
||||
(*saver)(FALSE);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
mark_all(cur_console);
|
||||
wakeup((caddr_t)&scrn_blanked);
|
||||
}
|
||||
|
|
@ -2490,10 +2490,10 @@ wait_scrn_saver_stop(void)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
while (scrn_blanked > 0) {
|
||||
error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
if (error != ERESTART)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3153,7 +3153,7 @@ ansi_put(scr_stat *scp, u_char *buf, int len)
|
|||
|
||||
/* make screensaver happy */
|
||||
if (scp == cur_console)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
write_in_progress++;
|
||||
outloop:
|
||||
|
|
@ -3621,7 +3621,7 @@ next_code:
|
|||
|
||||
/* make screensaver happy */
|
||||
if (!(scancode & 0x80))
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
if (!(flags & SCGETC_CN)) {
|
||||
/* do the /dev/random device a favour */
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
|
||||
* $Id: init_main.c,v 1.90 1998/04/17 22:36:49 des Exp $
|
||||
* $Id: init_main.c,v 1.91 1998/04/19 23:31:54 julian Exp $
|
||||
*/
|
||||
|
||||
#include "opt_devfs.h"
|
||||
|
|
@ -432,7 +432,7 @@ proc0_post(dummy)
|
|||
*/
|
||||
microtime(&proc0.p_stats->p_start);
|
||||
timevalclear(&proc0.p_rtime);
|
||||
microruntime(&proc0.p_runtime);
|
||||
microuptime(&proc0.p_runtime);
|
||||
|
||||
/*
|
||||
* Give the ``random'' number generator a thump.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static volatile int print_tci = 1;
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: kern_clock.c,v 1.66 1998/04/06 08:26:03 phk Exp $
|
||||
* $Id: kern_clock.c,v 1.67 1998/04/08 09:01:53 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -562,7 +562,7 @@ nanotime(struct timespec *tv)
|
|||
}
|
||||
|
||||
void
|
||||
getmicroruntime(struct timeval *tvp)
|
||||
getmicrouptime(struct timeval *tvp)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -572,7 +572,7 @@ getmicroruntime(struct timeval *tvp)
|
|||
}
|
||||
|
||||
void
|
||||
getnanoruntime(struct timespec *tsp)
|
||||
getnanouptime(struct timespec *tsp)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ getnanoruntime(struct timespec *tsp)
|
|||
}
|
||||
|
||||
void
|
||||
microruntime(struct timeval *tv)
|
||||
microuptime(struct timeval *tv)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -598,7 +598,7 @@ microruntime(struct timeval *tv)
|
|||
}
|
||||
|
||||
void
|
||||
nanoruntime(struct timespec *tv)
|
||||
nanouptime(struct timespec *tv)
|
||||
{
|
||||
u_int count;
|
||||
u_int64_t delta;
|
||||
|
|
@ -691,7 +691,7 @@ set_timecounter(struct timespec *ts)
|
|||
{
|
||||
struct timespec ts2;
|
||||
|
||||
nanoruntime(&ts2);
|
||||
nanouptime(&ts2);
|
||||
boottime.tv_sec = ts->tv_sec - ts2.tv_sec;
|
||||
boottime.tv_usec = (ts->tv_nsec - ts2.tv_nsec) / 1000;
|
||||
if (boottime.tv_usec < 0) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_resource.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: kern_resource.c,v 1.34 1998/04/04 13:25:18 phk Exp $
|
||||
* $Id: kern_resource.c,v 1.35 1998/04/05 02:59:10 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
|
|
@ -516,7 +516,7 @@ calcru(p, up, sp, ip)
|
|||
* important since the error here is on the order of a time
|
||||
* quantum, which is much greater than the sampling error.
|
||||
*/
|
||||
microruntime(&tv);
|
||||
microuptime(&tv);
|
||||
sec += tv.tv_sec - p->p_runtime.tv_sec;
|
||||
usec += tv.tv_usec - p->p_runtime.tv_usec;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
|
||||
* $Id: kern_synch.c,v 1.53 1998/03/28 18:16:29 dufault Exp $
|
||||
* $Id: kern_synch.c,v 1.54 1998/04/04 13:25:20 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
|
@ -621,7 +621,7 @@ mi_switch()
|
|||
* Compute the amount of time during which the current
|
||||
* process was running, and add that to its total so far.
|
||||
*/
|
||||
microruntime(&tv);
|
||||
microuptime(&tv);
|
||||
u = p->p_rtime.tv_usec + (tv.tv_usec - p->p_runtime.tv_usec);
|
||||
s = p->p_rtime.tv_sec + (tv.tv_sec - p->p_runtime.tv_sec);
|
||||
if (u < 0) {
|
||||
|
|
@ -660,7 +660,7 @@ mi_switch()
|
|||
*/
|
||||
cnt.v_swtch++;
|
||||
cpu_switch(p);
|
||||
microruntime(&p->p_runtime);
|
||||
microuptime(&p->p_runtime);
|
||||
splx(x);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static volatile int print_tci = 1;
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: kern_clock.c,v 1.66 1998/04/06 08:26:03 phk Exp $
|
||||
* $Id: kern_clock.c,v 1.67 1998/04/08 09:01:53 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -562,7 +562,7 @@ nanotime(struct timespec *tv)
|
|||
}
|
||||
|
||||
void
|
||||
getmicroruntime(struct timeval *tvp)
|
||||
getmicrouptime(struct timeval *tvp)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -572,7 +572,7 @@ getmicroruntime(struct timeval *tvp)
|
|||
}
|
||||
|
||||
void
|
||||
getnanoruntime(struct timespec *tsp)
|
||||
getnanouptime(struct timespec *tsp)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ getnanoruntime(struct timespec *tsp)
|
|||
}
|
||||
|
||||
void
|
||||
microruntime(struct timeval *tv)
|
||||
microuptime(struct timeval *tv)
|
||||
{
|
||||
struct timecounter *tc;
|
||||
|
||||
|
|
@ -598,7 +598,7 @@ microruntime(struct timeval *tv)
|
|||
}
|
||||
|
||||
void
|
||||
nanoruntime(struct timespec *tv)
|
||||
nanouptime(struct timespec *tv)
|
||||
{
|
||||
u_int count;
|
||||
u_int64_t delta;
|
||||
|
|
@ -691,7 +691,7 @@ set_timecounter(struct timespec *ts)
|
|||
{
|
||||
struct timespec ts2;
|
||||
|
||||
nanoruntime(&ts2);
|
||||
nanouptime(&ts2);
|
||||
boottime.tv_sec = ts->tv_sec - ts2.tv_sec;
|
||||
boottime.tv_usec = (ts->tv_nsec - ts2.tv_nsec) / 1000;
|
||||
if (boottime.tv_usec < 0) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: kern_time.c,v 1.53 1998/05/14 10:38:52 peter Exp $
|
||||
* $Id: kern_time.c,v 1.54 1998/05/14 11:31:08 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -202,13 +202,13 @@ nanosleep1(p, rqt, rmt)
|
|||
return (EINVAL);
|
||||
if (rqt->tv_sec < 0 || rqt->tv_sec == 0 && rqt->tv_nsec == 0)
|
||||
return (0);
|
||||
getnanoruntime(&ts);
|
||||
getnanouptime(&ts);
|
||||
timespecadd(&ts, rqt);
|
||||
TIMESPEC_TO_TIMEVAL(&tv, rqt);
|
||||
for (;;) {
|
||||
error = tsleep(&nanowait, PWAIT | PCATCH, "nanslp",
|
||||
tvtohz(&tv));
|
||||
getnanoruntime(&ts2);
|
||||
getnanouptime(&ts2);
|
||||
if (error != EWOULDBLOCK) {
|
||||
if (error == ERESTART)
|
||||
error = EINTR;
|
||||
|
|
@ -434,7 +434,7 @@ getitimer(p, uap)
|
|||
*/
|
||||
aitv = p->p_realtimer;
|
||||
if (timevalisset(&aitv.it_value)) {
|
||||
getmicroruntime(&ctv);
|
||||
getmicrouptime(&ctv);
|
||||
if (timevalcmp(&aitv.it_value, &ctv, <))
|
||||
timevalclear(&aitv.it_value);
|
||||
else
|
||||
|
|
@ -488,7 +488,7 @@ setitimer(p, uap)
|
|||
if (timevalisset(&aitv.it_value))
|
||||
p->p_ithandle = timeout(realitexpire, (caddr_t)p,
|
||||
tvtohz(&aitv.it_value));
|
||||
getmicroruntime(&ctv);
|
||||
getmicrouptime(&ctv);
|
||||
timevaladd(&aitv.it_value, &ctv);
|
||||
p->p_realtimer = aitv;
|
||||
} else
|
||||
|
|
@ -527,7 +527,7 @@ realitexpire(arg)
|
|||
s = splclock(); /* XXX: still neeeded ? */
|
||||
timevaladd(&p->p_realtimer.it_value,
|
||||
&p->p_realtimer.it_interval);
|
||||
getmicroruntime(&ctv);
|
||||
getmicrouptime(&ctv);
|
||||
if (timevalcmp(&p->p_realtimer.it_value, &ctv, >)) {
|
||||
ntv = p->p_realtimer.it_value;
|
||||
timevalsub(&ntv, &ctv);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: sys_generic.c,v 1.36 1998/04/04 13:25:32 phk Exp $
|
||||
* $Id: sys_generic.c,v 1.37 1998/04/05 10:03:52 ache Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
|
@ -600,7 +600,7 @@ select(p, uap)
|
|||
error = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
getmicroruntime(&rtv);
|
||||
getmicrouptime(&rtv);
|
||||
timevaladd(&atv, &rtv);
|
||||
} else
|
||||
atv.tv_sec = 0;
|
||||
|
|
@ -612,7 +612,7 @@ retry:
|
|||
if (error || p->p_retval[0])
|
||||
goto done;
|
||||
if (atv.tv_sec) {
|
||||
getmicroruntime(&rtv);
|
||||
getmicrouptime(&rtv);
|
||||
if (timevalcmp(&rtv, &atv, >=))
|
||||
goto done;
|
||||
ttv = atv;
|
||||
|
|
@ -730,7 +730,7 @@ poll(p, uap)
|
|||
error = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
getmicroruntime(&rtv);
|
||||
getmicrouptime(&rtv);
|
||||
timevaladd(&atv, &rtv);
|
||||
} else
|
||||
atv.tv_sec = 0;
|
||||
|
|
@ -742,7 +742,7 @@ retry:
|
|||
if (error || p->p_retval[0])
|
||||
goto done;
|
||||
if (atv.tv_sec) {
|
||||
getmicroruntime(&rtv);
|
||||
getmicrouptime(&rtv);
|
||||
if (timevalcmp(&rtv, &atv, >=))
|
||||
goto done;
|
||||
ttv = atv;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: uipc_socket2.c,v 1.33 1998/04/24 04:15:18 dg Exp $
|
||||
* $Id: uipc_socket2.c,v 1.34 1998/05/15 20:11:30 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -163,7 +163,7 @@ sodropablereq(head)
|
|||
static unsigned int cur_cnt, old_cnt;
|
||||
struct timeval tv;
|
||||
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
|
||||
old_runtime = tv;
|
||||
old_cnt = cur_cnt / i;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: uipc_socket2.c,v 1.33 1998/04/24 04:15:18 dg Exp $
|
||||
* $Id: uipc_socket2.c,v 1.34 1998/05/15 20:11:30 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
|
@ -163,7 +163,7 @@ sodropablereq(head)
|
|||
static unsigned int cur_cnt, old_cnt;
|
||||
struct timeval tv;
|
||||
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
|
||||
old_runtime = tv;
|
||||
old_cnt = cur_cnt / i;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: msdosfs_denode.c,v 1.34 1998/03/26 20:52:51 phk Exp $ */
|
||||
/* $Id: msdosfs_denode.c,v 1.35 1998/04/04 13:25:55 phk Exp $ */
|
||||
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
|
|
@ -346,7 +346,7 @@ deget(pmp, dirclust, diroffset, depp)
|
|||
}
|
||||
} else
|
||||
nvp->v_type = VREG;
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
SETHIGH(ldep->de_modrev, tv.tv_sec);
|
||||
SETLOW(ldep->de_modrev, tv.tv_usec * 4294);
|
||||
VREF(ldep->de_devvp);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
|
||||
*
|
||||
* $Id: if_spppsubr.c,v 1.37 1998/04/06 09:30:39 phk Exp $
|
||||
* $Id: if_spppsubr.c,v 1.38 1998/04/06 11:40:17 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
|
@ -1021,7 +1021,7 @@ sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
|
|||
struct mbuf *m;
|
||||
struct timeval tv;
|
||||
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
|
||||
MGETHDR (m, M_DONTWAIT, MT_DATA);
|
||||
if (! m)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.84 1998/04/18 05:09:07 kato Exp $
|
||||
* $Id: syscons.c,v 1.85 1998/05/04 07:47:29 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
|
@ -1167,7 +1167,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
scrn_blank_time = *(int *)data;
|
||||
if (scrn_blank_time == 0)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
|
||||
case CONS_CURSORTYPE: /* set cursor type blink/noblink */
|
||||
|
|
@ -1535,7 +1535,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
|||
return EINVAL;
|
||||
}
|
||||
/* make screensaver happy */
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2589,7 +2589,7 @@ scrn_timer(void *arg)
|
|||
}
|
||||
|
||||
/* should we stop the screen saver? */
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
if (panicstr)
|
||||
scrn_time_stamp = tv;
|
||||
if (tv.tv_sec <= scrn_time_stamp.tv_sec + scrn_blank_time)
|
||||
|
|
@ -2723,7 +2723,7 @@ static void
|
|||
stop_scrn_saver(void (*saver)(int))
|
||||
{
|
||||
(*saver)(FALSE);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
mark_all(cur_console);
|
||||
wakeup((caddr_t)&scrn_blanked);
|
||||
}
|
||||
|
|
@ -2733,10 +2733,10 @@ wait_scrn_saver_stop(void)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
while (scrn_blanked > 0) {
|
||||
error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0);
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
if (error != ERESTART)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3788,7 +3788,7 @@ ansi_put(scr_stat *scp, u_char *buf, int len)
|
|||
|
||||
/* make screensaver happy */
|
||||
if (scp == cur_console)
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
write_in_progress++;
|
||||
outloop:
|
||||
|
|
@ -4459,7 +4459,7 @@ next_code:
|
|||
|
||||
/* make screensaver happy */
|
||||
if (!(scancode & 0x80))
|
||||
getmicroruntime(&scrn_time_stamp);
|
||||
getmicrouptime(&scrn_time_stamp);
|
||||
|
||||
if (!(flags & SCGETC_CN)) {
|
||||
/* do the /dev/random device a favour */
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)time.h 8.5 (Berkeley) 5/4/95
|
||||
* $Id: time.h,v 1.25 1998/04/23 00:11:32 eivind Exp $
|
||||
* $Id: time.h,v 1.26 1998/04/23 14:12:06 eivind Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TIME_H_
|
||||
|
|
@ -265,16 +265,16 @@ struct clockinfo {
|
|||
extern struct timecounter *timecounter;
|
||||
extern time_t time_second;
|
||||
|
||||
void getmicroruntime __P((struct timeval *tv));
|
||||
void getmicrouptime __P((struct timeval *tv));
|
||||
void getmicrotime __P((struct timeval *tv));
|
||||
void getnanoruntime __P((struct timespec *tv));
|
||||
void getnanouptime __P((struct timespec *tv));
|
||||
void getnanotime __P((struct timespec *tv));
|
||||
void init_timecounter __P((struct timecounter *tc));
|
||||
int itimerdecr __P((struct itimerval *itp, int usec));
|
||||
int itimerfix __P((struct timeval *tv));
|
||||
void microruntime __P((struct timeval *tv));
|
||||
void microuptime __P((struct timeval *tv));
|
||||
void microtime __P((struct timeval *tv));
|
||||
void nanoruntime __P((struct timespec *ts));
|
||||
void nanouptime __P((struct timespec *ts));
|
||||
void nanotime __P((struct timespec *ts));
|
||||
void set_timecounter __P((struct timespec *ts));
|
||||
void timevaladd __P((struct timeval *, struct timeval *));
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)time.h 8.5 (Berkeley) 5/4/95
|
||||
* $Id: time.h,v 1.25 1998/04/23 00:11:32 eivind Exp $
|
||||
* $Id: time.h,v 1.26 1998/04/23 14:12:06 eivind Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TIME_H_
|
||||
|
|
@ -265,16 +265,16 @@ struct clockinfo {
|
|||
extern struct timecounter *timecounter;
|
||||
extern time_t time_second;
|
||||
|
||||
void getmicroruntime __P((struct timeval *tv));
|
||||
void getmicrouptime __P((struct timeval *tv));
|
||||
void getmicrotime __P((struct timeval *tv));
|
||||
void getnanoruntime __P((struct timespec *tv));
|
||||
void getnanouptime __P((struct timespec *tv));
|
||||
void getnanotime __P((struct timespec *tv));
|
||||
void init_timecounter __P((struct timecounter *tc));
|
||||
int itimerdecr __P((struct itimerval *itp, int usec));
|
||||
int itimerfix __P((struct timeval *tv));
|
||||
void microruntime __P((struct timeval *tv));
|
||||
void microuptime __P((struct timeval *tv));
|
||||
void microtime __P((struct timeval *tv));
|
||||
void nanoruntime __P((struct timespec *ts));
|
||||
void nanouptime __P((struct timespec *ts));
|
||||
void nanotime __P((struct timespec *ts));
|
||||
void set_timecounter __P((struct timespec *ts));
|
||||
void timevaladd __P((struct timeval *, struct timeval *));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
|
||||
* $Id: ufs_vnops.c,v 1.83 1998/04/17 22:37:19 des Exp $
|
||||
* $Id: ufs_vnops.c,v 1.84 1998/05/07 04:58:58 msmith Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
|
|
@ -2000,7 +2000,7 @@ ufs_vinit(mntp, specops, fifoops, vpp)
|
|||
/*
|
||||
* Initialize modrev times
|
||||
*/
|
||||
getmicroruntime(&tv);
|
||||
getmicrouptime(&tv);
|
||||
SETHIGH(ip->i_modrev, tv.tv_sec);
|
||||
SETLOW(ip->i_modrev, tv.tv_usec * 4294);
|
||||
*vpp = vp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue