diff options
author | Julian Elischer <julian@FreeBSD.org> | 2004-08-13 00:53:40 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 2004-08-13 00:53:40 +0000 |
commit | 9a9472afd94db0351f05e18d1bc1fae58681ddee (patch) | |
tree | 6dfd41093067f1c8f42fa771b89a61c15c12637c /sys/sys/cdefs.h | |
parent | b59db7bbe8875a17c1911fb8961941d66add3666 (diff) | |
download | src-9a9472afd94db0351f05e18d1bc1fae58681ddee.tar.gz src-9a9472afd94db0351f05e18d1bc1fae58681ddee.zip |
Add a macro to define the size of a subsection of a structure.
Used in fork1() and thr_create()
Notes
Notes:
svn path=/head/; revision=133604
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r-- | sys/sys/cdefs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 2a57705622e1..77f1fd425df6 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -241,6 +241,8 @@ * require it. */ #define __offsetof(type, field) ((size_t)(&((type *)0)->field)) +#define __rangeof(type, start, end) \ + (__offsetof(type, end) - __offsetof(type, start)) /* * Compiler-dependent macros to declare that functions take printf-like |