Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/include/sys/zfs_context.h
Show All 26 Lines | |||||
#ifndef _SYS_ZFS_CONTEXT_H | #ifndef _SYS_ZFS_CONTEXT_H | ||||
#define _SYS_ZFS_CONTEXT_H | #define _SYS_ZFS_CONTEXT_H | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
#ifdef __KERNEL__ | /* | ||||
* This code compiles in three different contexts. When __KERNEL__ is defined, | |||||
* the code uses "unix-like" kernel interfaces. When _STANDALONE is defined, the | |||||
* code is running in a reduced capacity environment of the boot loader which is | |||||
* generally a subset of both POSIX and kernel interfaces (with a few unique | |||||
* interfaces too). When neither are defined, it's in a userland POSIX or | |||||
* similar environment. | |||||
*/ | |||||
#if defined(__KERNEL__) || defined(_STANDALONE) | |||||
#include <sys/note.h> | #include <sys/note.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/atomic.h> | #include <sys/atomic.h> | ||||
#include <sys/sysmacros.h> | #include <sys/sysmacros.h> | ||||
#include <sys/vmsystm.h> | #include <sys/vmsystm.h> | ||||
#include <sys/condvar.h> | #include <sys/condvar.h> | ||||
#include <sys/cmn_err.h> | #include <sys/cmn_err.h> | ||||
#include <sys/kmem.h> | #include <sys/kmem.h> | ||||
Show All 16 Lines | |||||
#include <sys/zfs_delay.h> | #include <sys/zfs_delay.h> | ||||
#include <sys/sunddi.h> | #include <sys/sunddi.h> | ||||
#include <sys/ctype.h> | #include <sys/ctype.h> | ||||
#include <sys/disp.h> | #include <sys/disp.h> | ||||
#include <sys/trace.h> | #include <sys/trace.h> | ||||
#include <sys/procfs_list.h> | #include <sys/procfs_list.h> | ||||
#include <sys/mod.h> | #include <sys/mod.h> | ||||
#include <sys/zfs_context_os.h> | #include <sys/zfs_context_os.h> | ||||
#else /* _KERNEL */ | #else /* _KERNEL || _STANDALONE */ | ||||
#define _SYS_MUTEX_H | #define _SYS_MUTEX_H | ||||
#define _SYS_RWLOCK_H | #define _SYS_RWLOCK_H | ||||
#define _SYS_CONDVAR_H | #define _SYS_CONDVAR_H | ||||
#define _SYS_VNODE_H | #define _SYS_VNODE_H | ||||
#define _SYS_VFS_H | #define _SYS_VFS_H | ||||
#define _SYS_SUNDDI_H | #define _SYS_SUNDDI_H | ||||
#define _SYS_CALLB_H | #define _SYS_CALLB_H | ||||
▲ Show 20 Lines • Show All 677 Lines • ▼ Show 20 Lines | |||||
#define ____cacheline_aligned | #define ____cacheline_aligned | ||||
/* | /* | ||||
* Kernel modules | * Kernel modules | ||||
*/ | */ | ||||
#define __init | #define __init | ||||
#define __exit | #define __exit | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL || _STANDALONE */ | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
}; | }; | ||||
#endif | #endif | ||||
#endif /* _SYS_ZFS_CONTEXT_H */ | #endif /* _SYS_ZFS_CONTEXT_H */ |