summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-08-24 16:17:20 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-08-24 16:17:24 +0200
commitb3b4f4224206fb6f6fabaefbb2d93b021347713e (patch)
treed84acf95102f836ce00c04a68bc6c020b35802fe
parent867bc15c83e235d14b562c2b83b5b95a6e7655e5 (diff)
downloadgnutls-b3b4f4224206fb6f6fabaefbb2d93b021347713e.tar.gz
doc: be more explicit about the usage of gnutls_global_init/deinit [ci skip]
-rw-r--r--lib/global.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/global.c b/lib/global.c
index d75cea8330..0b57f3d6d7 100644
--- a/lib/global.c
+++ b/lib/global.c
@@ -194,6 +194,10 @@ static int _gnutls_init_ret = 0;
/**
* gnutls_global_init:
*
+ * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly
+ * called. To disable the implicit call (in a library constructor) of this
+ * function set the environment variable %GNUTLS_NO_EXPLICIT_INIT to 1.
+ *
* This function performs any required precalculations, detects
* the supported CPU capabilities and initializes the underlying
* cryptographic backend. In order to free any resources
@@ -207,11 +211,6 @@ static int _gnutls_init_ret = 0;
* function can be called many times, but will only do something the
* first time.
*
- * Since GnuTLS 3.3.0 this function is automatically called on library
- * constructor. Since the same version this function is also thread safe.
- * The automatic initialization can be avoided if the environment variable
- * %GNUTLS_NO_EXPLICIT_INIT is set to be 1.
- *
* A subsequent call of this function if the initial has failed will
* return the same error code.
*
@@ -456,6 +455,10 @@ static void _gnutls_global_deinit(unsigned destructor)
* This function deinitializes the global data, that were initialized
* using gnutls_global_init().
*
+ * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly
+ * called. GnuTLS will automatically deinitialize on library destructor. See
+ * gnutls_global_init() for disabling the implicit initialization/deinitialization.
+ *
**/
void gnutls_global_deinit(void)
{