From be627fc84711d2382d179392e3313f9fda8d24a3 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Wed, 4 Dec 2019 13:12:57 -0800 Subject: Refactor zfs_context.h to build on FreeBSD - on Linux move Linux specific headers to zfs_context_os.h - on FreeBSD move FreeBSD specific definitions to zfs_context_os.h - remove duplicate tsd_ definitions - remove unused AT_TYPE Reviewed-by: Jorgen Lundman Reviewed-by: Brian Behlendorf Reviewed-by: Don Brady Signed-off-by: Matt Macy Closes #9668 --- include/sys/zfs_context.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'include/sys/zfs_context.h') diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index c14d92a2c..5a67ca677 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -29,7 +29,6 @@ #define _SYS_ZFS_CONTEXT_H #ifdef __KERNEL__ - #include #include #include @@ -48,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -61,11 +59,8 @@ #include #include #include -#include -#include #include -#include - +#include #else /* _KERNEL */ #define _SYS_MUTEX_H @@ -88,7 +83,6 @@ #include #include #include -#include #include #include #include @@ -101,7 +95,6 @@ #include #include #include -#include #include #include #include @@ -117,6 +110,8 @@ #include #include +#include + /* * Stack */ @@ -333,15 +328,7 @@ extern void cv_broadcast(kcondvar_t *cv); */ #define tsd_get(k) pthread_getspecific(k) #define tsd_set(k, v) pthread_setspecific(k, v) -#define tsd_create(kp, d) pthread_key_create(kp, d) -#define tsd_destroy(kp) /* nothing */ - -/* - * Thread-specific data - */ -#define tsd_get(k) pthread_getspecific(k) -#define tsd_set(k, v) pthread_setspecific(k, v) -#define tsd_create(kp, d) pthread_key_create(kp, d) +#define tsd_create(kp, d) pthread_key_create((pthread_key_t *)kp, d) #define tsd_destroy(kp) /* nothing */ /* @@ -562,7 +549,6 @@ typedef struct vsecattr { size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */ } vsecattr_t; -#define AT_TYPE 0x00001 #define AT_MODE 0x00002 #define AT_UID 0x00004 #define AT_GID 0x00008 -- cgit v1.2.3