Date: Sat, 20 Oct 2007 19:52:44 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127832 for review Message-ID: <200710201952.l9KJqiEM042672@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127832 Change 127832 by kmacy@kmacy_home:ethng on 2007/10/20 19:52:30 more general compat macros and typedefs move atomics to own header Affected files ... .. //depot/projects/ethng/src/sys/sys/linux_compat.h#6 edit Differences ... ==== //depot/projects/ethng/src/sys/sys/linux_compat.h#6 (text+ko) ==== @@ -15,13 +15,17 @@ typedef uint32_t __u32; typedef uint64_t __u64; +typedef int8_t __s8; +typedef int16_t __s16; +typedef int32_t __s32; +typedef int64_t __s64; + typedef uint8_t __be8; typedef uint16_t __be16; typedef uint32_t __be32; typedef uint64_t __be64; #define __attribute_const__ -typedef volatile int atomic_t; #define rw_semaphore rwlock #define __user typedef struct rwlock rwlock_t; @@ -133,4 +137,15 @@ static inline void idr_init(struct idr *idp){} +#define copy_from_user(a,b,c) copyin(b,a,c) +#define copy_to_user(a,b,c) copyout(b,a,c) +#define __user +#define put_user(a,b) copyout(&a,b,4) +#define get_user(a,b) copyin(&a,b,4) + + +#define ERR_PTR(err) ((void *)((long)(err))) +#define IS_ERR(ptr) ((unsigned long)(ptr) > (unsigned long)(-1000)) +#define PTR_ERR(ptr) ((long)(ptr)) + #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710201952.l9KJqiEM042672>