tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Implement mode_select for atapi tape drives - round 4
On Sun, Aug 09, 2009 at 09:47:29PM +0200, Manuel Bouyer wrote:
>
> I don't get it. If the hardware (scsi devices in this case) defines
> a structure like e.g
> struct foo {
> int8_t data1;
> int32_t data2;
> int8_t data3
> int32_t data4;
> };
> the software on the host side will have to do misaligned accesses whatever
> we do, isn't it ? How do we avoid the compiler from padding the members
> without __packed ?
For data2 use __attribute__((__aligned__(1)))
and for data4 __attribute__((__aligned__(2)))
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index