Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jul 2001 19:30:13 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys bio.h 
Message-ID:  <200107060230.f662UD904688@mass.dis.org>
In-Reply-To: Your message of "Thu, 05 Jul 2001 08:35:32 MDT." <200107051435.f65EZWU60519@aslan.scsiguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >I don't need a private structure (i would have malloced it then), just
> >a few values in a private scalar variable/field (only a couple of
> >values would have sufficed for me, but bde pointed out that something
> >like the ATA driver might have use for more distinct values here).
> 
> Why not use a union in bio for any "private use space" we care to
> put in it?  This is what cam does:
> 
> typedef union {
>         void            *ptr;
>         u_long          field;
>         u_int8_t        bytes[sizeof(void *) > sizeof(u_long)
>                               ? sizeof(void *) : sizeof(u_long)];
> } ccb_priv_entry;

Because this is basically just overkill, where a uintptr_t would suffice.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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