From: Stephen Crane <steve.crane@rococosoft.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
Daryl Van Vorst <daryl@wideray.com>,
"'BlueZ Mailing List'" <bluez-devel@lists.sourceforge.net>
Subject: RE: [Bluez-devel] Alignment issue
Date: Thu, 12 Aug 2004 11:10:48 +0100 [thread overview]
Message-ID: <1092305447.24961.1169.camel@baroque.rococosoft.com> (raw)
In-Reply-To: <1092302834.28711.72.camel@pegasus>
Hi Marcel,
On Thu, 2004-08-12 at 10:27, Marcel Holtmann wrote:
> Hi David,
>
> > > this is what the Linux kernel is using and we will notice it if some
> > > compiler version will optimize it in future. I committed that change to
> > > CVS.
> >
> > The Linux kernel isn't the best example to follow when it comes to
> > relying on undocumented and unguaranteed compiler behaviour. Don't be so
> > sure the kernel would notice -- we have to fix up alignment trap in the
> > kernel _anyway_ so the use of get_unaligned() is only an optimisation
> > there.
> >
> > I'd be more inclined to play with using char * pointers in the memcpy,
> > and/or __attribute__((packed)).
>
> I am not an expert when it comes to specific compiler stuff and I can't
> make the best decision with my limited information. What I realized is
> that we need our own unaligned access implementation, because we can't
> rely on the asm/unaligned.h. So I started to put our own in bluetooth.h
> for general access. If this was wrong, please correct me.
I don't think this is wrong, in the absence of a system-supplied one.
This is the basic problem if you ask me: <asm/unaligned.h> _should_ be a
user-space header file (provided by glibc or something) because
unaligned access _is_ something that people who write network programs
need.
Later,
Steve
--
Stephen Crane, Rococo Software Ltd. http://www.rococosoft.com
steve.crane@rococosoft.com +353-1-6601315 (ext 209)
next prev parent reply other threads:[~2004-08-12 10:10 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 18:38 [Bluez-devel] Alignment issue Daryl Van Vorst
2004-08-10 23:12 ` Marcel Holtmann
2004-08-11 9:20 ` Stephen Crane
2004-08-11 11:08 ` David Woodhouse
2004-08-11 19:33 ` Marcel Holtmann
2004-08-11 7:13 ` Marcel Holtmann
2004-08-11 16:44 ` Daryl Van Vorst
2004-08-11 19:31 ` Marcel Holtmann
2004-08-12 8:34 ` David Woodhouse
2004-08-12 9:27 ` Marcel Holtmann
2004-08-12 10:01 ` David Woodhouse
2004-08-12 10:22 ` Marcel Holtmann
2004-08-12 10:35 ` David Woodhouse
2004-08-12 11:00 ` Marcel Holtmann
2004-08-12 11:33 ` David Woodhouse
2004-08-12 11:49 ` Marcel Holtmann
2004-08-12 12:02 ` David Woodhouse
2004-08-12 12:29 ` Marcel Holtmann
2004-08-12 13:36 ` Marcel Holtmann
2004-08-13 8:07 ` David Woodhouse
2004-08-13 9:05 ` Marcel Holtmann
2004-08-13 9:14 ` David Woodhouse
2004-08-13 11:52 ` David Woodhouse
2004-08-13 12:40 ` Marcel Holtmann
2004-08-12 12:53 ` David Woodhouse
2004-08-13 9:58 ` Marcel Holtmann
2004-08-13 10:56 ` David Woodhouse
2004-08-12 10:10 ` Stephen Crane [this message]
2004-08-12 10:25 ` Marcel Holtmann
2005-01-20 14:30 ` David Woodhouse
2005-01-20 14:45 ` Marcel Holtmann
2005-01-20 14:59 ` David Woodhouse
2005-01-20 18:14 ` Marcel Holtmann
2005-01-21 8:26 ` David Woodhouse
2005-01-23 8:12 ` Marcel Holtmann
2005-01-23 11:39 ` Marcel Holtmann
2005-01-23 12:29 ` David Woodhouse
2005-01-23 14:40 ` Marcel Holtmann
2005-01-23 15:11 ` David Woodhouse
2005-01-23 15:22 ` Marcel Holtmann
2005-01-23 23:16 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2004-08-16 9:48 john smith
2004-08-16 10:15 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092305447.24961.1169.camel@baroque.rococosoft.com \
--to=steve.crane@rococosoft.com \
--cc=bluez-devel@lists.sourceforge.net \
--cc=daryl@wideray.com \
--cc=dwmw2@infradead.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox