structure padding

Dag-ErlingSmørgrav des at des.no
Thu Jan 8 13:28:22 PST 2004


John Baldwin <jhb at FreeBSD.org> writes:
> Maybe:
>
> 	struct eproc {
> 		union {
> 			pid_t e_sid;
> 			long e_oldspare;
> 		}
> 		long	e_spare[1];
>
> (I think gcc supports anonymous unions like that.)

I thought about that, but it's butt-ugly...

Does anyone have an Alpha running 4.x that I could test this on?

> In 6.0 you could remove the union hack and change the ABI, assuming that you 
> want to put this in 5.x as well.

5.x has a completely different struct kinfo_proc which already
contains the session id.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-alpha mailing list