In message <[EMAIL PROTECTED]> "David O'Brien" writes:
: On Sat, Sep 15, 2001 at 12:13:58PM -0600, Warner Losh wrote:
: > In message <[EMAIL PROTECTED]> "David O'Brien" writes:
: > : It is best to order this from largest to smallest size if you are worried
: > : about alignment holes, etc.
: > :
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes:
>On Sat, Sep 15, 2001 at 12:13:58PM -0600, Warner Losh wrote:
>> unfortunately, there are many device structures that are passed around
>> via DMA and hte like that don't let you do this...
>
>How come? The struct represents some [semi-]p
On Sat, Sep 15, 2001 at 12:13:58PM -0600, Warner Losh wrote:
> In message <[EMAIL PROTECTED]> "David O'Brien" writes:
> : It is best to order this from largest to smallest size if you are worried
> : about alignment holes, etc.
> :
> : int64_t d; /* 8-byte boundary */
> : int32_t c; /* 4-
In message <[EMAIL PROTECTED]> "David O'Brien" writes:
: It is best to order this from largest to smallest size if you are worried
: about alignment holes, etc.
:
: int64_t d; /* 8-byte boundary */
: int32_t c; /* 4-byte boundary */
: int32_t f; /* 4-byte boundary */
: int
On Fri, Sep 14, 2001 at 12:23:44PM +0400, Yar Tikhiy wrote:
> E.g., will the following structure:
> struct foo {
> };
> contain alignment holes in any architecture/compiler?
It is best to order this from largest to smallest size if you are worried
about alignment holes, etc.
int64_t d; /
> In message <[EMAIL PROTECTED]> Mike Smith writes:
> : Any form of packing is going to cause problems for items that are
> : located in illegal fashions.
>
> It is almost more appropriate to use bus_space_{read,write} than using
> memory mapped structures. The bus macros will work for otherwis
In message <[EMAIL PROTECTED]> Mike Smith writes:
: Any form of packing is going to cause problems for items that are
: located in illegal fashions.
It is almost more appropriate to use bus_space_{read,write} than using
memory mapped structures. The bus macros will work for otherwise
unaligned
> On Thu, Sep 13, 2001 at 04:09:57PM -0700, Mike Smith wrote:
> > >
> > > Is there a single blessed way to define packed structures
> > > for use in drivers? I suspect that using "#pragma pack(1)"
> > > will lead to alignment errors in non-Intel architectures.
> >
> > Any form of packing is goi
Peter Wemm writes:
> The same goes for __format_arg(n) in stdio.h. And so on. We've been pretty
> clean about it so far, but a few have slipped through.
>
That __format_arg, btw, breaks the Compaq CCC compiler & causes us to
have to override stdio.h because of just that one line.
Does you
Terry Lambert wrote:
> Mike Smith wrote:
> > Having said that, I recommend using __attribute__ ((packed))
> > to explicitly request that a structure be packed.
>
> Is there a problem with "#pragma pack(1)"? I see it in a
> lot of header files... do they need changing?
Yes, but it should be:
#de
Mike Smith wrote:
> Having said that, I recommend using __attribute__ ((packed))
> to explicitly request that a structure be packed.
Is there a problem with "#pragma pack(1)"? I see it in a
lot of header files... do they need changing?
-- Terry
To Unsubscribe: send mail to [EMAIL PROTECTED]
wi
On Thu, Sep 13, 2001 at 04:09:57PM -0700, Mike Smith wrote:
> >
> > Is there a single blessed way to define packed structures
> > for use in drivers? I suspect that using "#pragma pack(1)"
> > will lead to alignment errors in non-Intel architectures.
>
> Any form of packing is going to cause pr
> Hi there,
>
> Is there a single blessed way to define packed structures
> for use in drivers? I suspect that using "#pragma pack(1)"
> will lead to alignment errors in non-Intel architectures.
Any form of packing is going to cause problems for items that are
located in illegal fashions.
Hav
> Hi there,
>
> Is there a single blessed way to define packed structures
> for use in drivers? I suspect that using "#pragma pack(1)"
> will lead to alignment errors in non-Intel architectures.
gcc deals with it, certainly on alpha anyway. However, I don't think
anyone would ever bless using
Hi there,
Is there a single blessed way to define packed structures
for use in drivers? I suspect that using "#pragma pack(1)"
will lead to alignment errors in non-Intel architectures.
Should char arrays be used for all multi-byte elements to
avoid alignment problems?
And is it OK to rely on sp
15 matches
Mail list logo