Commit graph

10 commits

Author SHA1 Message Date
Felix Fietkau
45210ce141 list.h: add container_of_safe macro
It works like container_of, except that it also deals with NULL pointers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-04-29 12:57:52 +02:00
Felix Fietkau
d716ac4bc4 list.h: add a few missing iterator macros
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-08-19 08:56:59 +02:00
Felix Fietkau
ace64897d4 switch from typeof to the more portable __typeof__
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-04-07 15:21:33 +02:00
Felix Fietkau
009b4d574e list.h: implement type safety for container_of()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-03-18 05:55:00 +01:00
Felix Fietkau
d6d6f11625 list.h: undefine LIST_HEAD to prevent conflicts on mac os x 2012-10-04 16:11:04 +02:00
Felix Fietkau
92da3a9bcc replace list.h with a BSD licensed variant (taken from FreeBSD SVN) 2012-02-06 21:09:51 +01:00
Felix Fietkau
01c6f73ed7 list.h: rename parameter named "new" to "_new" to avoid using a reserved C++ keyword (patch by Arthur Davis) 2011-10-27 10:16:09 +02:00
Felix Fietkau
f213e8b432 remove the hlist code 2011-03-26 20:38:33 +01:00
Felix Fietkau
82ce342055 merge an avl list implementation (imported from PacketBB) 2010-12-28 23:59:06 +01:00
Felix Fietkau
e82d74f898 Initial import 2010-10-13 21:29:08 +02:00