Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2002 23:21:08 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Jake Burkholder <jake@locore.ca>
Cc:        Thomas Moestl <tmoestl@gmx.net>, <freebsd-arch@FreeBSD.ORG>
Subject:   Re: adding more endian conversion and bus space functions
Message-ID:  <20020113230455.K709-100000@gamplex.bde.org>
In-Reply-To: <20020112115513.L39321@locore.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 12 Jan 2002, Jake Burkholder wrote:

> Apparently, On Fri, Jan 11, 2002 at 10:00:45PM +1100,
> 	Bruce Evans said words to the effect of;
> > Mike Barcroft is doing this.  IIRC, it doesn't have <sys/endian.h>, since
> > the ntohl() family is declared in <net/arpa.h> according to POSIX, so
> > <sys/endian.h> would be neither standard no useful.
>
> It is useful to if we don't have to duplicate C implementations
> of byte swapping functions 5 times.

The current ones are in libc.  Mike moved most of the common parts to
<sys/param.h> and/or <sys/types.h>.

> > I think the bus
> > space headers should not depend on any endianness support in other
> > headers except <machine/endian.h> defining _[_]BYTE_ORDER.
>
> Why?  I disagree.

Because they are specialized for bus accesses and need to support many
more types of accesses than <machine/endian.h>.  They can easily duplicate
the small part of ntohl(), etc., that they need (if they need it), like
the i386 one already does for most of the i/o instructions in the
i386 cpufunc.h.

Bruce


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




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