[PATCH 5/5] Add arc4random() etc. from OpenBSD 5.8
Sebastian Huber
sebastian.huber@embedded-brains.de
Mon Mar 21 07:07:00 GMT 2016
On 18/03/16 21:07, Corinna Vinschen wrote:
> On Mar 18 19:07, Sebastian Huber wrote:
>> >----- Am 18. Mrz 2016 um 18:01 schrieb Corinna Vinschenvinschen@redhat.com:
>>> > >Patch proposal:
>>> > >[...]
>> >Out of curiosity, why is this __isthreaded stuff not covered by <sys/lock.h> or only necessary here, e.g. in contrast to for example the atexit lock?
> It's copied from OpenBSD, see their lib/libc/include/thread_private.h.
> The foo_lock functions don't test for __isthreaded by themselves.
From my point of view it makes no sense for this special case handling
here. It should be covered by <sys/lock.h>. What is the functional
difference of the arc4random and the atexit context? If you need a lock
for atexit state, then you need it for arc4random state and vice versa.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list