Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: steven.moix at axianet.ch (Steven Moix)
Subject: Broken dbus
Date: Mon, 28 Apr 2008 18:33:10 +0200	[thread overview]
Message-ID: <1209400390.2671.0.camel@HP6710.axianet.ch> (raw)
In-Reply-To: <48149637.9070204@hp.com>

Heh! Thanks for this very complete and clear explanation :)

Steven

On Sun, 2008-04-27 at 11:05 -0400, Jay Estabrook wrote:
> Sigh...
> 
> I knew it was too early on a Sunday morning for this... ;-}
> 
> Estabrook, Jay wrote:
> > 
> > The poor programming practice (hal) arises from assuming that all
> > architectures have a natural boundary of 32-bits. Something like
> > the following are indicative:
> > 
> >    pointer = (void *)((((char *)address) + 3) & ~3);
> 
> Should be:
> 
>     pointer = (void *)((((char *)address) + 4) & ~3);
> 
> which rounds UP to the next 32-bit natural boundary.
> 
> > 
> > Better is:
> > 
> >    #define SZM (sizeof(void*)-1)
> >    pointer = (void *)((((char *)address) + SZM) & ~SZM);
> 
> And this should be:
> 
>    #define SZ  (sizeof(void*))
>    #define SZM (SZ-1)
>    pointer = (void *)((((char *)address) + SZ) & ~SZM);
> 
> which also rounds UP.
> 
> Now back to the funny pages... ;-}
> 
> --Jay++
> 
> _______________________________________________
> axp-list mailing list
> axp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/axp-list



  parent reply	other threads:[~2008-04-28 16:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 21:23 New FC 8 kernel RPMS in updates Jay.Estabrook
2008-04-21 23:16 ` marco
2008-04-22 14:36   ` Jay.Estabrook
2008-04-22 18:30     ` marco
2008-04-25  8:35 ` steven.moix
2008-04-25  8:40   ` oliver
2008-04-25  8:50     ` steven.moix
2008-04-25  8:54       ` oliver
2008-04-25  9:38         ` steven.moix
2008-04-25  9:41           ` oliver
2008-04-26 13:48             ` Are smolt/dbus working well? (Re: New FC 8 kernel RPMS in updates) furutaka
2008-04-26 14:03               ` steven.moix
2008-04-26 18:20                 ` Jay.Estabrook
2008-04-26 20:47                 ` Are smolt/dbus working well? furutaka
2008-04-26 22:06                   ` Jay.Estabrook
2008-04-27  8:09                     ` Broken dbus steven.moix
2008-04-27  8:46                       ` furutaka
2008-04-27 14:26                         ` Jay.Estabrook
2008-04-27 15:05                           ` Jay.Estabrook
2008-04-28  2:51                             ` maurice
2008-04-28 12:09                               ` Jay.Estabrook
2008-04-28 13:52                                 ` maurice
2008-04-28 16:33                             ` steven.moix [this message]
2008-04-28 16:40                               ` Jay.Estabrook
2008-04-28 22:03                                 ` Jay.Estabrook
2008-04-28 23:36                                   ` furutaka
2008-05-01  7:51                                   ` steven.moix
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox