Subject: Re: changed files: 'src/sys/sys proc.h'
To: Theo Deraadt <>
From: John Brezak <>
List: source-changes
Date: 11/21/1993 10:17:04
> If you ever try to use an emulation, you're going to have to do
> it like this
> 	if (p->p_emul == EMUL_SUNOS)
> 		...
> #endif
> This lets the EMUL_* flags be defined per processor. it does
> not make sense to have p_emul ever have a value of EMUL_SUNOS
> on an i386 (let's not talk about the 386i, that bastard creation
> was never really sunos)
> > there shouldn't be that many EMUL's...
> i don't think this is relevant. the case is that an EMUL_AMIGAUNIX
> should never occur anywhere except if there is an equivelant
> COMPAT_AMIGAUNIX flag defined for the kernel.. so no problem.

Another way to do this might be to leave a place for a macro hook in common
places in the MI code. 

> 	if (p->p_emul == EMUL_SUNOS)
> 		...
> #endif
This would become (if it is in fork for example)


Then in a file like machine/hooks.h it would have the correct code for
things. Similar things can be done in sys/proc.h and have the proc struct
hooks in machine/proc.h .

 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet:
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5103