diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-20 16:34:56 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-20 16:35:27 +0200 |
commit | 81cb86bb7bc353a10958edbe59bf2e6ddc266d44 (patch) | |
tree | eb98b40ebed9082393d3b4182d5a4a5d4085ce0b | |
parent | 1ee47cabc741fade1453a7bffeea707fbc89d381 (diff) | |
download | gnutls-81cb86bb7bc353a10958edbe59bf2e6ddc266d44.tar.gz |
doc: clarifications on custom thread override [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | doc/cha-gtls-app.texi | 7 | ||||
-rw-r--r-- | lib/locks.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi index 8b417d6f00..8fcb6dfe0a 100644 --- a/doc/cha-gtls-app.texi +++ b/doc/cha-gtls-app.texi @@ -352,15 +352,16 @@ library. The GnuTLS library is initialized on load; prior to 3.3.0 was initialized by calling @funcref{gnutls_global_init}@footnote{ The original behavior of requiring explicit initialization can obtained by setting the GNUTLS_NO_EXPLICIT_INIT environment variable to 1, or by using the macro GNUTLS_SKIP_GLOBAL_INIT -in a global section of your program.}. +in a global section of your program --the latter works in systems with +support for weak symbols only.}. The initialization typically enables CPU-specific acceleration, performs any required precalculations needed, opens any required system devices (e.g., /dev/urandom on Linux) and initializes subsystems that could be used later. The resources allocated by the initialization process will be released -on library deinitialization, or explicitly by calling @funcref{gnutls_global_deinit}. +on library deinitialization. -Note that during initialization file descriptors may be kept open by +Note that on certain systems file descriptors may be kept open by GnuTLS (e.g. /dev/urandom) on library load. Applications closing all unknown file descriptors must immediately call @funcref{gnutls_global_init}, after that, to ensure they don't disrupt GnuTLS' operation. diff --git a/lib/locks.c b/lib/locks.c index 8b94b6c62a..494199a5a1 100644 --- a/lib/locks.c +++ b/lib/locks.c @@ -43,6 +43,10 @@ * unless really needed to. GnuTLS will use the appropriate locks for the running * system. * + * Note that since the move to implicit initialization of GnuTLS on library + * load, calling this function will deinitialize the library, and re-initialize + * it after the new locking functions are set. + * * This function must be called prior to any other gnutls function. * * Since: 2.12.0 |