Blame doc/functions/gnutls_global_init

Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
Packit aea12f
@deftypefun {int} {gnutls_global_init} ( @var{void})
Packit aea12f
Packit aea12f
Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly
Packit aea12f
called. To disable the implicit call (in a library constructor) of this
Packit aea12f
function set the environment variable @code{GNUTLS_NO_EXPLICIT_INIT}  to 1.
Packit aea12f
Packit aea12f
This function performs any required precalculations, detects
Packit aea12f
the supported CPU capabilities and initializes the underlying
Packit aea12f
cryptographic backend. In order to free any resources 
Packit aea12f
taken by this call you should @code{gnutls_global_deinit()}  
Packit aea12f
when gnutls usage is no longer needed.
Packit aea12f
Packit aea12f
This function increments a global counter, so that
Packit aea12f
@code{gnutls_global_deinit()}  only releases resources when it has been
Packit aea12f
called as many times as @code{gnutls_global_init()} .  This is useful when
Packit aea12f
GnuTLS is used by more than one library in an application.  This
Packit aea12f
function can be called many times, but will only do something the
Packit Service 991b93
first time. It is thread safe since GnuTLS 3.3.0.
Packit aea12f
Packit aea12f
A subsequent call of this function if the initial has failed will
Packit aea12f
return the same error code.
Packit aea12f
Packit aea12f
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned,
Packit aea12f
otherwise a negative error code is returned.
Packit aea12f
@end deftypefun