Date: Fri, 23 Feb 2007 17:11:30 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 114884 for review Message-ID: <200702231711.l1NHBUSw046942@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114884 Change 114884 by millert@millert_macbook on 2007/02/23 17:10:47 This is a kernel-only include; remove non-kernel portion. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/linux-compat.h#8 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/linux-compat.h#8 (text+ko) ==== @@ -47,19 +47,15 @@ */ #include <sys/types.h> /* NOTE: mach sys/types, not BSD one. */ -#ifdef KERNEL #include <kern/locks.h> #include <libkern/OSByteOrder.h> #include <libkern/OSAtomic.h> -#else -#include <sys/lock.h> -#include <architecture/byte_order.h> -#endif typedef u_int64_t u64; typedef u_int64_t __le64; typedef u_int32_t u32; typedef u_int32_t __le32; +typedef u_int32_t __be32; typedef u_int16_t u16; typedef u_int16_t __le16; typedef u_int16_t __be16; @@ -91,19 +87,6 @@ #define likely(exp) __builtin_expect(!!(exp), 1) #define unlikely(exp) __builtin_expect(!!(exp), 0) -#if !defined(_KERNEL) && !defined(KERNEL) - -/* sedarwin uses same ss source files for userspace */ -#define kcalloc(nmemb, size, flags) calloc(nmemb, size) -#define kmalloc(size, flags) malloc(size) -#define kzalloc(size, flags) calloc(1, size) -#define kfree(v) free(v) -#define __get_free_page(flags) malloc(PAGE_SIZE) -#define GFP_ATOMIC 1 -#define GFP_KERNEL 2 - -#else /* _KERNEL */ - #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define NIPQUAD(addr) \ @@ -170,8 +153,6 @@ } while (!OSCompareAndSwap(oldval, newval, ptr)); } -#endif /* _KERNEL */ - #define BUG() printf("BUG: %s:%d", __FILE__, __LINE__) #define BUG_ON(x) do { if (x) BUG(); } while(0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702231711.l1NHBUSw046942>