| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: list.h,v 1.10 2018/08/27 06:55:43 riastradh Exp $ */ | | 1 | /* $NetBSD: list.h,v 1.11 2018/08/27 06:57:44 riastradh Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Taylor R. Campbell. | | 8 | * by Taylor R. Campbell. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -315,18 +315,18 @@ hlist_del_init(struct hlist_node *node) | | | @@ -315,18 +315,18 @@ hlist_del_init(struct hlist_node *node) |
315 | | | 315 | |
316 | #define hlist_add_behind_rcu(n, p) pslist_writer_insert_after(p, n) | | 316 | #define hlist_add_behind_rcu(n, p) pslist_writer_insert_after(p, n) |
317 | #define hlist_add_head_rcu pslist_writer_insert_head | | 317 | #define hlist_add_head_rcu pslist_writer_insert_head |
318 | #define hlist_del_init_rcu hlist_del_init /* no special needs */ | | 318 | #define hlist_del_init_rcu hlist_del_init /* no special needs */ |
319 | | | 319 | |
320 | #define hlist_first_rcu pslist_reader_first | | 320 | #define hlist_first_rcu pslist_reader_first |
321 | #define hlist_next_rcu pslist_reader_next | | 321 | #define hlist_next_rcu pslist_reader_next |
322 | | | 322 | |
323 | #define hlist_for_each_entry_rcu(VAR, HEAD, FIELD) \ | | 323 | #define hlist_for_each_entry_rcu(VAR, HEAD, FIELD) \ |
324 | for ((VAR) = (hlist_first_rcu(HEAD) == NULL ? NULL : \ | | 324 | for ((VAR) = (hlist_first_rcu(HEAD) == NULL ? NULL : \ |
325 | hlist_entry(hlist_first_rcu(HEAD), typeof(*(VAR)), \ | | 325 | hlist_entry(hlist_first_rcu(HEAD), typeof(*(VAR)), \ |
326 | FIELD)); \ | | 326 | FIELD)); \ |
327 | (VAR) != NULL; \ | | 327 | (VAR) != NULL; \ |
328 | (VAR) = (hlist_next_rcu(VAR) == NULL ? NULL : \ | | 328 | (VAR) = (hlist_next_rcu(&(VAR)->FIELD) == NULL ? NULL : \ |
329 | hlist_entry(hlist_next_rcu(VAR), typeof(*(VAR)), \ | | 329 | hlist_entry(hlist_next_rcu(&(VAR)->FIELD), \ |
330 | FIELD))) | | 330 | typeof(*(VAR)), FIELD))) |
331 | | | 331 | |
332 | #endif /* _LINUX_LIST_H_ */ | | 332 | #endif /* _LINUX_LIST_H_ */ |