[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-developers] Re: Gratuitous gcry_fast_random_poll
From: |
Marcus Brinkmann |
Subject: |
[GNUnet-developers] Re: Gratuitous gcry_fast_random_poll |
Date: |
Wed, 05 May 2004 22:54:09 -0000 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Wed, 05 May 2004 20:36:09 +0200,
Werner Koch wrote:
>
> On Wed, 05 May 2004 19:35:34 +0200, Marcus Brinkmann said:
>
> > The asserts in the code check if the proper lock/unlock calls are made
> > in the single-threaded case, too.
>
> Which is a Good Thing.
>
> > If the locking interface is exported in gcrypt, and users are
> > responsible for their own locking, these assertions should probably be
> > removed.
>
> Why? Calling ath_mutex_lock on a locked mutex is a severe error in
> any case.
Yes, but compare it with pthread: you have error checking locks
(robust locks) and fast locks. And everybody just uses the fast locks
and never checks the error.
It's not a good thing if a library gives an assertion failure, unless
there really is an internal error. An error value returned would be
better, but nobody would check it. Oh well.
Marcus