summaryrefslogtreecommitdiffstats
path: root/sys/sys/sysent.h
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2011-01-26 20:03:58 +0000
committerdchagin <dchagin@FreeBSD.org>2011-01-26 20:03:58 +0000
commit1e124ec538abd89755a07370b3e298c5d4e275bc (patch)
tree11e55f54986e1fd2a80fd707f1d646272a4b9266 /sys/sys/sysent.h
parent0044f4e6eb992ee895bfd4d01fcd358a52ef2622 (diff)
downloadFreeBSD-src-1e124ec538abd89755a07370b3e298c5d4e275bc.zip
FreeBSD-src-1e124ec538abd89755a07370b3e298c5d4e275bc.tar.gz
Add macro to test the sv_flags of any process. Change some places to test
the flags instead of explicit comparing with address of known sysentvec structures. MFC after: 1 month
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r--sys/sys/sysent.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 55cac2b..d96a6ba 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -129,8 +129,10 @@ struct sysentvec {
#define SV_SHP 0x010000
#define SV_ABI_MASK 0xff
-#define SV_CURPROC_FLAG(x) (curproc->p_sysent->sv_flags & (x))
-#define SV_CURPROC_ABI() (curproc->p_sysent->sv_flags & SV_ABI_MASK)
+#define SV_PROC_FLAG(p, x) ((p)->p_sysent->sv_flags & (x))
+#define SV_PROC_ABI(p) ((p)->p_sysent->sv_flags & SV_ABI_MASK)
+#define SV_CURPROC_FLAG(x) SV_PROC_FLAG(curproc, x)
+#define SV_CURPROC_ABI() SV_PROC_ABI(curproc)
/* same as ELFOSABI_XXX, to prevent header pollution */
#define SV_ABI_LINUX 3
#define SV_ABI_FREEBSD 9
OpenPOWER on IntegriCloud