mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 15:28:58 +01:00
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:
parent
434d5d1923
commit
48535f1870
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user