From 2bb8060d572311e4a42a35fb52e78f78e42725ee Mon Sep 17 00:00:00 2001 From: Yinan Zhang Date: Wed, 22 Jul 2020 16:44:18 -0700 Subject: [PATCH] Add empty test and concat for typed list --- include/jemalloc/internal/typed_list.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/jemalloc/internal/typed_list.h b/include/jemalloc/internal/typed_list.h index 7ad2237f..6535055a 100644 --- a/include/jemalloc/internal/typed_list.h +++ b/include/jemalloc/internal/typed_list.h @@ -42,6 +42,14 @@ list_type##_replace(list_type##_t *list, el_type *to_remove, \ static inline void \ list_type##_remove(list_type##_t *list, el_type *item) { \ ql_remove(&list->head, item, linkage); \ +} \ +static inline bool \ +list_type##_empty(list_type##_t *list) { \ + return ql_empty(&list->head); \ +} \ +static inline void \ +list_type##_concat(list_type##_t *list_a, list_type##_t *list_b) { \ + ql_concat(&list_a->head, &list_b->head, linkage); \ } #endif /* JEMALLOC_INTERNAL_TYPED_LIST_H */