[gnutls-devel] GnuTLS | Possible code simplifications using gnulib's pthread modules (#803)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Jul 17 15:16:52 CEST 2019



Tim Rühsen created an issue:


  Two days ago, Bruno Haible announced a bunch of new modules for gnulib, which look very promising.
It means, we could get rid off our own thread checking/compat code (configure.ac, lib/locks.h).

Bruno's message from the gnulib ML:

I'm committing a set of gnulib modules that support the essential portion of
POSIX <pthread.h> and its functions.

* pthread-h: A POSIX-like <pthread.h>.
* pthread-thread: Creating and controlling POSIX threads.
* pthread-once: POSIX once-only control.
* pthread-mutex: POSIX mutexes (locks).
* pthread-rwlock: POSIX read-write locks.
* pthread-cond: POSIX condition variables.
* pthread-tss: POSIX thread-specific storage.
* pthread-spin: POSIX spin locks.
* pthread: Now merely a convenience wrapper for all of the above.

This has been tested on all customary platforms, from glibc systems up to
native Windows with MSVC, and Android.

Like for the older 'thread', 'lock', 'cond', 'tls' modules, on mingw systems
the installing user can choose among
  --enable-threads=posix       (which uses the mingw winpthreads library)
and
  --enable-threads=windows     (which uses native Windows code, like on MSVC).
The default currently is --enable-threads=posix.
The package developer can change the default by placing an invocation to
gl_AVOID_WINPTHREAD in the configure.ac file.
Why is this useful? Because the pthread-tss test hangs with
  --enable-threads=posix
but works fine with
  --enable-threads=windows

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/803
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190717/a6a733f8/attachment.html>


More information about the Gnutls-devel mailing list