Add a macro to define the size of a subsection of a structure.

Used in fork1() and thr_create()
This commit is contained in:
julian 2004-08-13 00:53:40 +00:00
parent 4386366573
commit 622c9da995

View File

@ -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