diff options
author | hselasky <hselasky@FreeBSD.org> | 2018-02-25 10:39:39 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2018-02-25 10:39:39 +0000 |
commit | 05e6cf26b81490a562706283802e3d4a9161d2b2 (patch) | |
tree | 82a0e83fe825189741a933d1c78fea8dd32feda7 | |
parent | f2bfceaf42ebb90232ed43f51b91537e9b77c713 (diff) | |
download | FreeBSD-src-05e6cf26b81490a562706283802e3d4a9161d2b2.zip FreeBSD-src-05e6cf26b81490a562706283802e3d4a9161d2b2.tar.gz |
MFC r329584:
Implement list_safe_reset_next() function macro in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 311a6ad..826a8cf 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -179,6 +179,9 @@ list_del_init(struct list_head *entry) #define list_next_entry(ptr, member) \ list_entry(((ptr)->member.next), typeof(*(ptr)), member) +#define list_safe_reset_next(ptr, n, member) \ + (n) = list_next_entry(ptr, member) + #define list_prev_entry(ptr, member) \ list_entry(((ptr)->member.prev), typeof(*(ptr)), member) |