Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 1997 19:17:00 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-sys@FreeBSD.ORG, fsmp@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/sys lock.h src/sys/i386/include param.h smp.h src/sys/i386/isa apic_ipl.s apic_vector.s ipl.s src/sys/i386/i386 exception.s mp_machdep.c mpapic.c
Message-ID:  <199707240917.TAA14432@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>fsmp        1997/07/23 13:47:20 PDT
>
>  Modified files:
>    sys/sys              lock.h 
>  Log:
>  Forced 32bit alignment of struct simple_lock.
>  
>  Revision  Changes    Path
>  1.5       +3 -2      src/sys/sys/lock.h

Erm, this is bogus.  sys/lock.h is supposed to be machine-independent.  It
should have no knowledge of machine-dependent alignment requirements.
Alignment is guaranteed if alignment of the machine-dependent struct is
guaranteed.

>  Modified files:
>    sys/i386/include     param.h smp.h 
>  Log:
>  Forced 32bit alignment of struct simple_lock in param.h.

Alignment of the machine-dependent struct was already guaranteed, since
the struct contains an int, and 32-bit alignment of ints is guaranteed
in practice (although the CPU does not require it) since misalignment
would be inefficient.

BTW, 64-bit alignment of anything is not guaranteed.  gcc -malign-double
doesn't actually work.  The primary bug is `#define MAX_ALIGNMENT
sizeof(long)' in ld/i386/md.h.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707240917.TAA14432>