[gnutls-dev] Re: living without global variables

Nikos Mavrogiannopoulos nmav at gnutls.org
Mon Dec 26 12:20:20 CET 2005


On Sunday 25 December 2005 15:13, Simon Josefsson wrote:

> Perhaps GnuTLS should deallocate these variables in an `atexit' hook
> instead.  Then it seem all of this problem would go away.  In GNU
> libc, atexit hooks are even called if GnuTLS was dlopen+dlclose'd.
> gnutls_global_deinit() would then only call gc_done().

I don't see how this can be usefull. Adding a sentance in the 
global_init() function that it is not thread safe I think should be
sufficient. This is a one time call initialization function, so it is 
perfectly ok to leave the thread stuff to the called application.

-- 
Nikos Mavrogiannopoulos



More information about the Gnutls-dev mailing list