Date: Wed, 27 Feb 2002 18:19:37 +0100 From: Thomas Moestl <tmm@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libstand Makefile src/sys/alpha/include bus.h endian.h src/sys/conf files.alpha files.ia64 src/sys/dev/iir iir.h src/sys/i386/include bus.h endian.h src/sys/ia64/include bus.h endian.h src/sys/sys imgact_aout.h mchain.h param.h ... Message-ID: <20020227171937.GA285@crow.dom2ip.de> In-Reply-To: <200202271716.g1RHGIZ26036@freefall.freebsd.org> References: <200202271716.g1RHGIZ26036@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2002/02/27 at 09:16:18 -0800, Thomas Moestl wrote: > tmm 2002/02/27 09:16:18 PST > > Modified files: > lib/libstand Makefile > sys/alpha/include bus.h endian.h > sys/conf files.alpha files.ia64 > sys/dev/iir iir.h > sys/i386/include bus.h endian.h > sys/ia64/include bus.h endian.h > sys/sys imgact_aout.h mchain.h param.h > sys/dev/usb ohci.c uhci.c usb_port.h > sys/dev/wi if_wi.c > sys/libkern/alpha byte_swap_2.S byte_swap_4.S > sys/libkern/ia64 byte_swap_2.S byte_swap_4.S > sys/powerpc/include endian.h > sys/sparc64/include endian.h > Added files: > sys/libkern/alpha bswap16.S bswap32.S > sys/libkern/ia64 bswap16.S bswap32.S > Removed files: > sys/libkern/alpha htonl.S htons.S ntohl.S ntohs.S > sys/libkern/ia64 htonl.S htons.S ntohl.S ntohs.S > Log: > Add the following functions/macros to support byte order conversions and > device drivers for bus system with other endinesses than the CPU (using > interfaces compatible to NetBSD): > > - bwap16() and bswap32(). These have optimized implementations on some > architectures; for those that don't, there exist generic implementations. > - macros to convert from a certain byte order to host byte order and vice > versa, using a naming scheme like le16toh(), htole16(). > These are implemented using the bswap functions. > - stream bus space access functions, which do not perform a byte order > conversion (while the normal access functions would if the bus endianess > differs from the CPU endianess). > > htons(), htonl(), ntohs() and ntohl() are implemented using the new > functions above for kernel usage. None of the above interfaces is currently > exported to user land. > > Make use of the new functions in a few places where local implementations > of the same functionality existed. > > Reviewed by: mike, bde , jake Sorry. - thomas 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?20020227171937.GA285>