mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-02 17:08:56 +00:00
Don't bogusly include <struct.h>
Bogusly define our own versions of strbase() and fldoff() until we have sorted out where they live in the kernel.
This commit is contained in:
parent
dd98c08d71
commit
5a008b9415
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67447
@ -37,8 +37,6 @@
|
||||
#ifndef _SYS_QUEUE_H_
|
||||
#define _SYS_QUEUE_H_
|
||||
|
||||
#include <struct.h>
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* singly-linked tail queues, lists, tail queues, and circular queues.
|
||||
@ -110,6 +108,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX: temporary, we need to find the real home of these.
|
||||
*/
|
||||
|
||||
/* Offset of the field in the structure. */
|
||||
#define __qfldoff(name, field) \
|
||||
((int)&(((struct name *)0)->field))
|
||||
|
||||
/* Address of the structure from a field. */
|
||||
#define __qstrbase(name, addr, field) \
|
||||
((struct name *)((char *)(addr) - __qfldoff(name, field)))
|
||||
|
||||
/*
|
||||
* Singly-linked List declarations.
|
||||
*/
|
||||
@ -226,7 +236,7 @@ struct { \
|
||||
#define STAILQ_LAST(head, type, field) \
|
||||
(STAILQ_EMPTY(head) ? \
|
||||
NULL : \
|
||||
strbase(type, (head)->stqh_last, field))
|
||||
__qstrbase(type, (head)->stqh_last, field))
|
||||
|
||||
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user