[gnutls-devel] GnuTLS | gnutls_rnd manage memory per-thread (!1647)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Sep 24 05:00:17 CEST 2022



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1647 was reviewed by Daiki Ueno

--
  <!-- Get preloaded note discussion-->
  
Daiki Ueno started a new discussion on lib/random.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1647#note_1113011379

> -static _Thread_local unsigned rnd_initialized = 0;
> +gl_tls_key_t ctx_key;
> +_Thread_local unsigned rnd_initialized = 0;

Why not define as `static`?

--
  <!-- Get preloaded note discussion-->
  
Daiki Ueno started a new discussion on lib/random.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1647#note_1113011380

> - * used during deinitialization. */
> -GNUTLS_STATIC_MUTEX(gnutls_rnd_ctx_list_mutex);
> -static struct rnd_ctx_list_st *head = NULL;

We might want to keep this global list, because the glthread/tls documentation says: "On some platforms, the destructor function is not called at all."


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1647
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/20220924/195e2868/attachment.html>


More information about the Gnutls-devel mailing list