From 7b807a35a8dc63f9742cecf0fc3db46c30e28b0d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 2 May 2019 11:42:51 +0200 Subject: misc: Add twalk_r function The twalk function is very difficult to use in a multi-threaded program because there is no way to pass external state to the iterator function. Reviewed-by: Carlos O'Donell Reviewed-by: Adhemerval Zanella --- include/search.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/search.h') diff --git a/include/search.h b/include/search.h index e17693022d..72fbc94476 100644 --- a/include/search.h +++ b/include/search.h @@ -23,6 +23,8 @@ extern void *__tdelete (const void *__key, void **__rootp, libc_hidden_proto (__tdelete) extern void __twalk (const void *__root, __action_fn_t action); libc_hidden_proto (__twalk) +extern __typeof__ (twalk_r) __twalk_r; +libc_hidden_proto (__twalk_r) extern void __tdestroy (void *__root, __free_fn_t freefct); libc_hidden_proto (__tdestroy) #endif -- cgit 1.4.1