Date: Mon, 15 Oct 2007 03:32:39 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127541 for review Message-ID: <200710150332.l9F3Wd5Q080493@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127541 Change 127541 by kmacy@kmacy_home:ethng on 2007/10/15 03:32:10 add endian conversion routines as well as some more type annotations Affected files ... .. //depot/projects/ethng/src/sys/sys/linux_compat.h#2 edit Differences ... ==== //depot/projects/ethng/src/sys/sys/linux_compat.h#2 (text+ko) ==== @@ -1,6 +1,10 @@ -#ifndef _LINUX_COMPAT_H_ -#define _LINUX_COMPAT_H_ +#ifndef _SYS_LINUX_COMPAT_H_ +#define _SYS_LINUX_COMPAT_H_ +#include <machine/bus.h> +#include <sys/bus_dma.h> + + typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; @@ -41,4 +45,18 @@ typedef uint32_t gfp_t; typedef struct mtx spinlock_t; +#define __iomem +#define __init +#define __exit +#define __bitwise + +#define be16_to_cpu be16toh +#define be32_to_cpu be32toh +#define be64_to_cpu be64toh + +#define cpu_to_be16 htobe16 +#define cpu_to_be32 htobe32 +#define cpu_to_be64 htobe64 + +#define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field))) #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710150332.l9F3Wd5Q080493>