Added a per-cpu variable `switchticks' for use in scheduling.

This commit is contained in:
Bruce Evans 1999-02-22 15:13:34 +00:00
parent 3854f9f544
commit 025a06fd58
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44215
8 changed files with 17 additions and 9 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: machdep.c,v 1.30 1999/01/15 18:00:19 msmith Exp $
* $Id: machdep.c,v 1.31 1999/01/26 02:49:51 julian Exp $
*/
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -161,6 +161,7 @@ struct platform platform;
alpha_chipset_t chipset;
struct bootinfo_kernel bootinfo;
struct timeval switchtime;
int switchticks;
struct user *proc0paddr;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
* $Id: genassym.c,v 1.61 1998/09/24 10:22:21 bde Exp $
* $Id: genassym.c,v 1.62 1998/10/08 21:03:41 msmith Exp $
*/
#include "opt_vm86.h"
@ -199,6 +199,7 @@ main()
printf("#define\tGD_CURPCB %#x\n", OS(globaldata, curpcb));
printf("#define\tGD_COMMON_TSS %#x\n", OS(globaldata, common_tss));
printf("#define\tGD_SWITCHTIME %#x\n", OS(globaldata, switchtime));
printf("#define\tGD_SWITCHTICKS %#x\n", OS(globaldata, switchticks));
#ifdef VM86
printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, common_tssd));
printf("#define\tGD_PRIVATE_TSS %#x\n", OS(globaldata, private_tss));

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: globaldata.h,v 1.5 1998/05/28 09:30:02 phk Exp $
* $Id: globaldata.h,v 1.6 1998/08/18 07:47:12 msmith Exp $
*/
/*
@ -44,6 +44,7 @@ struct globaldata {
struct pcb *curpcb;
struct i386tss common_tss;
struct timeval switchtime;
int switchticks;
#ifdef VM86
struct segment_descriptor common_tssd;
u_int private_tss;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
* $Id: genassym.c,v 1.61 1998/09/24 10:22:21 bde Exp $
* $Id: genassym.c,v 1.62 1998/10/08 21:03:41 msmith Exp $
*/
#include "opt_vm86.h"
@ -199,6 +199,7 @@ main()
printf("#define\tGD_CURPCB %#x\n", OS(globaldata, curpcb));
printf("#define\tGD_COMMON_TSS %#x\n", OS(globaldata, common_tss));
printf("#define\tGD_SWITCHTIME %#x\n", OS(globaldata, switchtime));
printf("#define\tGD_SWITCHTICKS %#x\n", OS(globaldata, switchticks));
#ifdef VM86
printf("#define\tGD_COMMON_TSSD %#x\n", OS(globaldata, common_tssd));
printf("#define\tGD_PRIVATE_TSS %#x\n", OS(globaldata, private_tss));

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: globals.s,v 1.7 1998/08/18 07:46:58 msmith Exp $
* $Id: globals.s,v 1.8 1998/09/28 12:20:46 peter Exp $
*/
#include "opt_vm86.h"
@ -69,12 +69,13 @@
globaldata:
.space GD_SIZEOF /* in data segment */
#endif
.globl _curproc,_curpcb,_npxproc,_common_tss,_switchtime
.globl _curproc,_curpcb,_npxproc,_common_tss,_switchtime,_switchticks
.set _curproc,globaldata + GD_CURPROC
.set _curpcb,globaldata + GD_CURPCB
.set _npxproc,globaldata + GD_NPXPROC
.set _common_tss,globaldata + GD_COMMON_TSS
.set _switchtime,globaldata + GD_SWITCHTIME
.set _switchticks,globaldata + GD_SWITCHTICKS
#ifdef VM86
.globl _common_tssd,_private_tss,_my_tr

View File

@ -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.27 1999/01/30 15:38:48 kato Exp $
* $Id: asnames.h,v 1.28 1999/02/06 08:41:05 bde Exp $
*/
#ifndef _MACHINE_ASNAMES_H_
@ -354,6 +354,7 @@
#define _swi_generic swi_generic
#define _swi_null swi_null
#define _swi_vm swi_vm
#define _switchticks switchticks
#define _switchtime switchtime
#define _syscall syscall
#define _szsigcode szsigcode

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: globaldata.h,v 1.5 1998/05/28 09:30:02 phk Exp $
* $Id: globaldata.h,v 1.6 1998/08/18 07:47:12 msmith Exp $
*/
/*
@ -44,6 +44,7 @@ struct globaldata {
struct pcb *curpcb;
struct i386tss common_tss;
struct timeval switchtime;
int switchticks;
#ifdef VM86
struct segment_descriptor common_tssd;
u_int private_tss;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: globaldata.h,v 1.5 1998/05/28 09:30:02 phk Exp $
* $Id: globaldata.h,v 1.6 1998/08/18 07:47:12 msmith Exp $
*/
/*
@ -44,6 +44,7 @@ struct globaldata {
struct pcb *curpcb;
struct i386tss common_tss;
struct timeval switchtime;
int switchticks;
#ifdef VM86
struct segment_descriptor common_tssd;
u_int private_tss;