Page MenuHome GnuPG

Introduced a context with thread local storage
Open, NormalPublic

Description

For the FIPS service indicator API, considering the use cases with threads, a variable storing a context is required.

It is true that we could overload (== extend) the use of errno for that, but it is not cleaner solution.

While libgcrypt tries to support builds with C90 compilers on non-modern OSes too, it would be OK to use C compilers' feature of __thread specifier for thread-local storage.

(For C11/C23, we can use <threads.h> and thread_local.)

If it's OK, let us start with __thread assuming C compiler support.

Event Timeline

gniibe triaged this task as Normal priority.Wed, Oct 16, 7:21 AM
gniibe created this task.
gniibe updated the task description. (Show Details)