Allow `curproc' to be defined in <machine/proc.h> to enable a transition

to SMP support.
This commit is contained in:
pk 1998-10-19 11:51:53 +00:00
parent a029e1e7ca
commit 2d45ece0e7
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.132 1998/09/08 23:57:58 thorpej Exp $ */
/* $NetBSD: init_main.c,v 1.133 1998/10/19 11:51:53 pk Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou. All rights reserved.
@ -121,7 +121,9 @@ struct pcred cred0;
struct filedesc0 filedesc0;
struct plimit limit0;
struct vmspace vmspace0;
#ifndef curproc
struct proc *curproc = &proc0;
#endif
struct proc *initproc;
int cmask = CMASK;

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.66 1998/09/18 18:35:16 christos Exp $ */
/* $NetBSD: proc.h,v 1.67 1998/10/19 11:51:53 pk Exp $ */
/*-
* Copyright (c) 1986, 1989, 1991, 1993
@ -302,7 +302,13 @@ extern u_long pidhash;
extern LIST_HEAD(pgrphashhead, pgrp) *pgrphashtbl;
extern u_long pgrphash;
/*
* Note: <machine/proc.h> may provide a definition of `curproc' while
* transition to multi processor support is in progress.
*/
#ifndef curproc
extern struct proc *curproc; /* Current running proc. */
#endif
extern struct proc proc0; /* Process slot for swapper. */
extern int nprocs, maxproc; /* Current and max number of procs. */