offsetof, insque and remque can be used throughout the kernel,

so move their definitions here.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@35 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid 2002-07-10 13:17:22 +00:00
parent 434d5d1923
commit 48535f1870

View File

@ -44,6 +44,9 @@ extern "C" {
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
/** return the offset of member 'm' within type 't' */
#define offsetof(t, m) ((size_t)&(((t *)0)->m))
/** Is bit 'b' set in 'a' */
#define CHECK_BIT(a, b) ((a) & (1 << (b)))
/** Set bit 'b' in 'a' */
@ -51,6 +54,9 @@ extern "C" {
/** Unset bit 'b' in 'a' */
#define CLEAR_BIT(a, b) ((a) & (~(1 << (b))))
__inline void insque(void *, void*);
__inline void remque(void *);
#ifdef __cplusplus
}
#endif