misc: Add twalk_r function

Message ID 87h8af5qbl.fsf@oldenburg2.str.redhat.com
State Committed
Headers

Commit Message

Florian Weimer April 30, 2019, 5:57 p.m. UTC
  * Carlos O'Donell:

>> diff --git a/manual/search.texi b/manual/search.texi
>> index 1574c96562..26f2ceeb55 100644
>> --- a/manual/search.texi
>> +++ b/manual/search.texi
>> @@ -618,5 +618,28 @@ Since the functions used for the @var{action} parameter to @code{twalk}
>>   must not modify the tree data, it is safe to run @code{twalk} in more
>>   than one thread at the same time, working on the same tree.  It is also
>>   safe to call @code{tfind} in parallel.  Functions which modify the tree
>> -must not be used, otherwise the behavior is undefined.
>> +must not be used, otherwise the behavior is undefined. However, it is
>> +difficult to pass data external to the tree to the callback function
>> +without resorting to global variables (and threat safety issues), so
>
> s/threat/thread/g

Oops, thanks.  There's also a whitespace issue.  Fixed and pushed to the
fw/twalk_r branch.

I will wait for a second review before pushing this to master.

Florian
  

Patch

diff --git a/manual/search.texi b/manual/search.texi
index 26f2ceeb55..979732f027 100644
--- a/manual/search.texi
+++ b/manual/search.texi
@@ -618,9 +618,9 @@  Since the functions used for the @var{action} parameter to @code{twalk}
 must not modify the tree data, it is safe to run @code{twalk} in more
 than one thread at the same time, working on the same tree.  It is also
 safe to call @code{tfind} in parallel.  Functions which modify the tree
-must not be used, otherwise the behavior is undefined. However, it is
+must not be used, otherwise the behavior is undefined.  However, it is
 difficult to pass data external to the tree to the callback function
-without resorting to global variables (and threat safety issues), so
+without resorting to global variables (and thread safety issues), so
 see the @code{twalk_r} function below.
 @end deftypefun