From owner-p4-projects@FreeBSD.ORG Mon Oct 15 03:32:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A96716A41B; Mon, 15 Oct 2007 03:32:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F239016A419 for ; Mon, 15 Oct 2007 03:32:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DA04D13C47E for ; Mon, 15 Oct 2007 03:32:39 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9F3Wd9x080496 for ; Mon, 15 Oct 2007 03:32:39 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9F3Wd5Q080493 for perforce@freebsd.org; Mon, 15 Oct 2007 03:32:39 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 15 Oct 2007 03:32:39 GMT Message-Id: <200710150332.l9F3Wd5Q080493@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 127541 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2007 03:32:40 -0000 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 +#include + + 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