summaryrefslogtreecommitdiff
path: root/lib/locks.c
Commit message (Collapse)AuthorAgeFilesLines
* build: re-indent codeDaiki Ueno2023-04-241-3/+2
| | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Indent codeZoltan Fridrich2023-01-271-1/+0
| | | | | Co-authored-by: Simon Josefsson <simon@josefsson.org> Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
* locks: define lock functions as a macroDaiki Ueno2022-03-091-54/+0
| | | | | | | | | | | | When threads are not supported, glthread_* functions are defined as no-op and thus dereferencing lock variables in inline functions will cause compilation error. This change fixes it by redefining our lock functions as a macro so it will also be compiled out. Reported by Fabrice Fontaine in: https://gitlab.com/gnutls/gnutls/-/issues/1330 Signed-off-by: Daiki Ueno <ueno@gnu.org>
* locks: deprecate gnutls_global_set_mutexDaiki Ueno2021-11-171-15/+6
| | | | | | | As the library now uses static mutexes, rwlocks, and onces, it doesn't make much sense to only replace dynamic mutex usage. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* locks: use once execution for on-demand initialization of globalsDaiki Ueno2021-11-171-0/+9
| | | | | | | | | | This makes sure that the global variables are initialized only once. Most of those variables are initialized at ELF constructor, though a couple of occasions they are initialized on-demand: the global keylog file pointer and TPM2 TCTI context. To properly protect the initialization this patch uses gl_once provided by Gnulib. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* locks: rework rwlock primitivesDaiki Ueno2021-11-171-0/+27
| | | | | | | Remove GNUTLS_STATIC_RWLOCK_*LOCK macros and respect return values of rwlock primitives. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* locks: replace custom mutex wrappers with "glthread/lock.h"Daiki Ueno2021-11-171-0/+18
| | | | | | | As Gnulib provides portability wrappers of mutex implementations, we don't need to provide similar wrappers by ourselves. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Use https:// for www.gnu.org and www.example.comTim Rühsen2019-03-131-1/+1
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* doc: clarifications on custom thread override [ci skip]Nikos Mavrogiannopoulos2017-04-201-0/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Fix some typos [ci skip]Andreas Metzler2015-12-271-1/+1
|
* Removed the 'gnutls_' prefix from files to simplify file namingNikos Mavrogiannopoulos2015-08-231-3/+3
|
* re-enabled gnutls_global_set_mutex().Nikos Mavrogiannopoulos2014-05-071-4/+13
|
* reindented codeNikos Mavrogiannopoulos2013-11-081-8/+9
|
* Use LGPLv2.1 in the files their author's agreed to.Nikos Mavrogiannopoulos2013-02-011-1/+1
|
* Run 'make update-copyright'.Simon Josefsson2012-01-161-1/+1
|
* Clarify license and copyright.Simon Josefsson2011-08-031-1/+1
|
* More GTK-DOC improvements.Simon Josefsson2011-08-031-1/+2
|
* Upgraded to LGPLv3.Nikos Mavrogiannopoulos2011-06-231-7/+4
|
* Indented code. Use same indentation but with -nut to avoid usage of tabs. In ↵Nikos Mavrogiannopoulos2010-12-161-1/+1
| | | | several editors tabs can be configured not to be 8 spaces and this produces artifacts with the current indentation that is a mixture of tabs and spaces.
* Indent (using GNU indent 2.2.11).Simon Josefsson2010-10-141-3/+4
|
* Fix some syntax-check errors.Simon Josefsson2010-10-011-1/+0
|
* system specific functions were moved to system.cNikos Mavrogiannopoulos2010-07-101-141/+0
|
* Locks were converted to be in align with posix locks to easier wrap around them.Nikos Mavrogiannopoulos2010-07-031-18/+21
|
* The included pakchois will use gnutls locks and will use a portableNikos Mavrogiannopoulos2010-07-031-0/+16
| | | | dlopen() to allow compilation in win32 (untested).
* Do not allow setting NULL lock functionsNikos Mavrogiannopoulos2010-07-021-0/+3
|
* simplified locking code. Locking functions always exist but are dummies if noNikos Mavrogiannopoulos2010-06-291-14/+27
| | | | locks have been set.
* Initialization of crypto libraries moved outside main gnutls code.Nikos Mavrogiannopoulos2010-06-291-41/+0
|
* Moved locking code to special file.Nikos Mavrogiannopoulos2010-06-291-0/+209