Page MenuHomeFreeBSD

D44678.diff
No OneTemporary

D44678.diff

diff --git a/sys/sys/queue.h b/sys/sys/queue.h
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -393,9 +393,9 @@
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
} while (0)
-#define STAILQ_LAST(head, type, field) \
- (STAILQ_EMPTY((head)) ? NULL : \
- __containerof((head)->stqh_last, \
+#define STAILQ_LAST(head, type, field) \
+ (STAILQ_EMPTY((head)) ? NULL : \
+ __containerof((head)->stqh_last, \
QUEUE_TYPEOF(type), field.stqe_next))
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
@@ -498,7 +498,7 @@
if (LIST_NEXT((elm), field) != NULL && \
LIST_NEXT((elm), field)->field.le_prev != \
&((elm)->field.le_next)) \
- panic("Bad link elm %p next->prev != elm", (elm)); \
+ panic("Bad link elm %p next->prev != elm", (elm)); \
} while (0)
/*
@@ -516,21 +516,21 @@
#define QMD_LIST_CHECK_PREV(elm, field)
#endif /* (_KERNEL && INVARIANTS) */
-#define LIST_CONCAT(head1, head2, type, field) do { \
- QUEUE_TYPEOF(type) *curelm = LIST_FIRST(head1); \
- if (curelm == NULL) { \
- if ((LIST_FIRST(head1) = LIST_FIRST(head2)) != NULL) { \
- LIST_FIRST(head2)->field.le_prev = \
- &LIST_FIRST((head1)); \
- LIST_INIT(head2); \
- } \
- } else if (LIST_FIRST(head2) != NULL) { \
- while (LIST_NEXT(curelm, field) != NULL) \
- curelm = LIST_NEXT(curelm, field); \
- LIST_NEXT(curelm, field) = LIST_FIRST(head2); \
- LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(curelm, field); \
- LIST_INIT(head2); \
- } \
+#define LIST_CONCAT(head1, head2, type, field) do { \
+ QUEUE_TYPEOF(type) *curelm = LIST_FIRST(head1); \
+ if (curelm == NULL) { \
+ if ((LIST_FIRST(head1) = LIST_FIRST(head2)) != NULL) { \
+ LIST_FIRST(head2)->field.le_prev = \
+ &LIST_FIRST((head1)); \
+ LIST_INIT(head2); \
+ } \
+ } else if (LIST_FIRST(head2) != NULL) { \
+ while (LIST_NEXT(curelm, field) != NULL) \
+ curelm = LIST_NEXT(curelm, field); \
+ LIST_NEXT(curelm, field) = LIST_FIRST(head2); \
+ LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(curelm, field);\
+ LIST_INIT(head2); \
+ } \
} while (0)
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
@@ -588,12 +588,12 @@
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-#define LIST_PREV(elm, head, type, field) \
- ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \
- __containerof((elm)->field.le_prev, \
+#define LIST_PREV(elm, head, type, field) \
+ ((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \
+ __containerof((elm)->field.le_prev, \
QUEUE_TYPEOF(type), field.le_next))
-#define LIST_REMOVE_HEAD(head, field) \
+#define LIST_REMOVE_HEAD(head, field) \
LIST_REMOVE(LIST_FIRST(head), field)
#define LIST_REMOVE(elm, field) do { \
@@ -602,7 +602,7 @@
QMD_LIST_CHECK_NEXT(elm, field); \
QMD_LIST_CHECK_PREV(elm, field); \
if (LIST_NEXT((elm), field) != NULL) \
- LIST_NEXT((elm), field)->field.le_prev = \
+ LIST_NEXT((elm), field)->field.le_prev = \
(elm)->field.le_prev; \
*(elm)->field.le_prev = LIST_NEXT((elm), field); \
TRASHIT(*oldnext); \
@@ -679,7 +679,7 @@
*/
#define QMD_TAILQ_CHECK_TAIL(head, field) do { \
if (*(head)->tqh_last != NULL) \
- panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \
+ panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \
} while (0)
/*
@@ -761,7 +761,7 @@
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
-#define TAILQ_FOREACH_REVERSE_FROM_SAFE(var, head, headname, field, tvar) \
+#define TAILQ_FOREACH_REVERSE_FROM_SAFE(var, head, headname, field, tvar)\
for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
@@ -775,7 +775,7 @@
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
QMD_TAILQ_CHECK_NEXT(listelm, field); \
if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
+ TAILQ_NEXT((elm), field)->field.tqe_prev = \
&TAILQ_NEXT((elm), field); \
else { \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
@@ -830,7 +830,7 @@
* the previous element. FAST is very useful for instances when
* you may want to prefetch the last data element.
*/
-#define TAILQ_LAST_FAST(head, type, field) \
+#define TAILQ_LAST_FAST(head, type, field) \
(TAILQ_EMPTY(head) ? NULL : __containerof((head)->tqh_last, QUEUE_TYPEOF(type), field.tqe_next))
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
@@ -842,7 +842,7 @@
((elm)->field.tqe_prev == &(head)->tqh_first ? NULL : \
__containerof((elm)->field.tqe_prev, QUEUE_TYPEOF(type), field.tqe_next))
-#define TAILQ_REMOVE_HEAD(head, field) \
+#define TAILQ_REMOVE_HEAD(head, field) \
TAILQ_REMOVE(head, TAILQ_FIRST(head), field)
#define TAILQ_REMOVE(head, elm, field) do { \
@@ -851,7 +851,7 @@
QMD_TAILQ_CHECK_NEXT(elm, field); \
QMD_TAILQ_CHECK_PREV(elm, field); \
if ((TAILQ_NEXT((elm), field)) != NULL) \
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
+ TAILQ_NEXT((elm), field)->field.tqe_prev = \
(elm)->field.tqe_prev; \
else { \
(head)->tqh_last = (elm)->field.tqe_prev; \

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 1:29 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15754225
Default Alt Text
D44678.diff (5 KB)

Event Timeline