about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-05-02 11:42:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-05-02 11:42:51 +0200
commit7b807a35a8dc63f9742cecf0fc3db46c30e28b0d (patch)
tree0dce83854245814394b46373b4c8316ab7610b0c /include
parent20aa5819586ac7ad11f711bab64feda307965191 (diff)
downloadglibc-7b807a35a8dc63f9742cecf0fc3db46c30e28b0d.tar.gz
glibc-7b807a35a8dc63f9742cecf0fc3db46c30e28b0d.tar.xz
glibc-7b807a35a8dc63f9742cecf0fc3db46c30e28b0d.zip
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 <carlos@redhat.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/search.h2
1 files changed, 2 insertions, 0 deletions
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