Commit Graph

4 Commits

Author SHA1 Message Date
Kevin O'Connor 7af8d120fb malloc: Introduce common helper alloc_new_detail()
Introduce helper for finding temp space to hold an "allocation detail
struct" and use it in both alloc_add() and _malloc().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15 10:52:13 -04:00
Kevin O'Connor 030a58a05e Another fix for hlist_for_each_entry_safe.
Although the previous patch does fix hlist_for_each_entry_safe for the
common case, it doesn't work correctly when deleting the current
node.  To fix this, introduce two macros - hlist_for_each_entry_safe
for iterating through a list that can be modified, and
hlist_for_each_entry_pprev for those users that only need access to
the "pprev" pointer.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13 21:24:14 -04:00
Kevin O'Connor 9539e41c4d Fix error in hlist_for_each_entry_safe macro.
Fix broken macro - it did not work correctly at all.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13 20:47:28 -04:00
Kevin O'Connor e097a75ef0 Introduce and convert pmm code to use standard list helpers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08 21:49:12 -04:00