Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 90) sorted by relevance

1234

/openssl/crypto/thread/
H A Darch.c51 if (thread == NULL) in ossl_crypto_thread_native_join()
54 ossl_crypto_mutex_lock(thread->statelock); in ossl_crypto_thread_native_join()
57 ossl_crypto_condvar_wait(thread->condvar, thread->statelock); in ossl_crypto_thread_native_join()
65 ossl_crypto_condvar_wait(thread->condvar, thread->statelock); in ossl_crypto_thread_native_join()
70 ossl_crypto_mutex_unlock(thread->statelock); in ossl_crypto_thread_native_join()
75 ossl_crypto_mutex_lock(thread->statelock); in ossl_crypto_thread_native_join()
86 ossl_crypto_condvar_signal(thread->condvar); in ossl_crypto_thread_native_join()
87 ossl_crypto_mutex_unlock(thread->statelock); in ossl_crypto_thread_native_join()
90 *retval = thread->retval; in ossl_crypto_thread_native_join()
94 ossl_crypto_mutex_lock(thread->statelock); in ossl_crypto_thread_native_join()
[all …]
H A Dinternal.c43 CRYPTO_THREAD *thread; in ossl_crypto_thread_start() local
60 thread = ossl_crypto_thread_native_start(start, data, 1); in ossl_crypto_thread_start()
61 if (thread == NULL) { in ossl_crypto_thread_start()
67 thread->ctx = ctx; in ossl_crypto_thread_start()
70 return (void *) thread; in ossl_crypto_thread_start()
H A Dbuild.info7 IF[{- !$disabled{'thread-pool'} -}]
/openssl/crypto/thread/arch/
H A Dthread_posix.c20 CRYPTO_THREAD *thread; in thread_start_thunk() local
23 thread = (CRYPTO_THREAD *)vthread; in thread_start_thunk()
25 ret = thread->routine(thread->data); in thread_start_thunk()
26 ossl_crypto_mutex_lock(thread->statelock); in thread_start_thunk()
28 thread->retval = ret; in thread_start_thunk()
30 ossl_crypto_mutex_unlock(thread->statelock); in thread_start_thunk()
46 if (!thread->joinable) in ossl_crypto_thread_native_spawn()
54 thread->handle = handle; in ossl_crypto_thread_native_spawn()
58 thread->handle = NULL; in ossl_crypto_thread_native_spawn()
68 if (thread == NULL || thread->handle == NULL) in ossl_crypto_thread_native_perform_join()
[all …]
H A Dthread_win.c18 CRYPTO_THREAD *thread; in thread_start_thunk() local
21 thread = (CRYPTO_THREAD *)vthread; in thread_start_thunk()
23 thread->thread_id = GetCurrentThreadId(); in thread_start_thunk()
25 ret = thread->routine(thread->data); in thread_start_thunk()
26 ossl_crypto_mutex_lock(thread->statelock); in thread_start_thunk()
28 thread->retval = ret; in thread_start_thunk()
29 ossl_crypto_condvar_signal(thread->condvar); in thread_start_thunk()
47 thread->handle = handle; in ossl_crypto_thread_native_spawn()
51 thread->handle = NULL; in ossl_crypto_thread_native_spawn()
61 if (thread == NULL || thread->handle == NULL) in ossl_crypto_thread_native_perform_join()
[all …]
H A Dthread_none.c14 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread) in ossl_crypto_thread_native_spawn() argument
19 int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread, CRYPTO_THREAD_RETVAL *retval) in ossl_crypto_thread_native_perform_join() argument
29 int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread) in ossl_crypto_thread_native_is_self() argument
/openssl/doc/designs/
H A Dthread-api.md13 scheduled on the internal thread pool.
19 A thread pool is managed on a per-`OSSL_LIB_CTX` basis.
32 * Set the maximum number of threads to be used by the thread pool.
35 * threads and existing threads in the thread pool will be torn down.
46 * thread pool. If thread pooling is disabled or not available, returns 0.
67 /* Is thread pool functionality supported at all? */
85 A build option `thread-pool`/`no-thread-pool` will be introduced which allows
86 thread pool functionality to be compiled out. `no-thread-pool` implies
87 `no-default-thread-pool`.
89 A build option `default-thread-pool`/`no-default-thread-pool` will be introduced
[all …]
/openssl/test/
H A Dthreadstest.h27 static int wait_for_thread(thread_t thread) in wait_for_thread() argument
52 static int wait_for_thread(thread_t thread) in wait_for_thread() argument
54 return WaitForSingleObject(thread, INFINITE) == 0; in wait_for_thread()
77 static int wait_for_thread(thread_t thread) in wait_for_thread() argument
79 return pthread_join(thread, NULL) == 0; in wait_for_thread()
H A Dthreadstest_fips.c30 thread_t thread; in test_fips_rand_leak() local
34 if (!TEST_true(run_thread(&thread, thread_fips_rand_fetch))) in test_fips_rand_leak()
36 if (!TEST_true(wait_for_thread(thread))) in test_fips_rand_leak()
/openssl/doc/man3/
H A DOSSL_ERR_STATE_save.pod20 These functions save and restore the error state from the thread
24 be used when saving and restoring thread error state.
26 OSSL_ERR_STATE_save() saves the thread error state to I<es>. It
27 subsequently clears the thread error state. Any previously saved
32 to I<es> and removed from the thread error state. However, the most recent
38 effect.) If there is no marked ERR in the thread local error state, all ERR
43 saved state I<es> to the thread error state. Existing entries in
44 the thread error state are not affected if there is enough space
46 entries is duplicated on adding to the thread state.
62 over any allocated data from the thread error state.
[all …]
H A DCRYPTO_THREAD_run_once.pod12 OSSL_THREAD_SUPPORT_FLAG_DEFAULT_SPAWN - OpenSSL thread support
66 In particular, this can be used to allocate locks in a thread-safe manner,
152 thread pool. If the argument is 0, thread pooling is disabled. OpenSSL will
153 not create any threads and existing threads in the thread pool will be torn
161 OSSL_get_thread_support_flags() determines what thread pool functionality
164 thread pool functionality is available, and
167 available, therefore both of these flags must be set for thread pool
186 to be used by the thread pool. If thread pooling is disabled or not available,
207 You can find out if OpenSSL was configured with thread support:
211 /* thread support enabled */
[all …]
H A DRAND_get0_primary.pod27 The I<public> and I<private> DRBG are thread-local instances, which are used
53 It is not thread-safe to access the I<primary> DRBG instance.
55 they are thread-local. Note however, that changes to these two instances
56 apply only to the current thread.
71 The two set functions, operate on the current thread. If you want to
72 use the same random number generator across all threads, each thread
H A DOPENSSL_init_crypto.pod34 Additionally some resources are allocated on a per thread basis (if the
36 thread closing.
212 called after deinitialisation of resources local to a thread, but before other
217 with the current thread for the given OSSL_LIB_CTX B<ctx>. The B<ctx> parameter
221 the thread exits as long as the OSSL_LIB_CTX has not been freed before the thread
223 automatically for the current thread (but not any other threads that may have
229 resources are cleaned up on library exit) except if thread local resources
256 Resources local to a thread are deallocated automatically when the thread exits
262 directly via a call to OPENSSL_thread_stop() on each thread. Similarly this
265 thread. Additionally if OpenSSL is loaded dynamically via LoadLibrary() and the
[all …]
H A DEVP_set_default_properties.pod47 thread safe. They are intended to be called only during the initialisation
50 EVP_get1_default_properties() is not thread safe. The application must ensure
52 being modified by a different thread.
H A DASYNC_start_job.pod49 each thread that will initiate asynchronous jobs. Before
50 user code exits per-thread resources need to be cleaned up. This will normally
53 outstanding for the thread when ASYNC_cleanup_thread() is called. Failing to
94 When restarting a job ASYNC_start_job() B<must> be called from the same thread
105 At any one time there can be a maximum of one job actively running per thread
163 stack memory such as mmap, or using stack memory from the current thread.
244 * Create a way to inform the calling thread when this job is ready
275 * method. The main thread will wait until pipefds[0] is ready
276 * for reading before returning control to this thread.
H A DBN_BLINDING_new.pod65 structure is owned by the current thread. This is to help users
68 BN_BLINDING_set_current_thread() sets the current thread as the
98 BN_BLINDING_is_current_thread() returns 1 if the current thread owns
H A DERR_get_error.pod54 ERR_get_error() returns the earliest error code from the thread's error
58 ERR_peek_error() returns the earliest error code from the thread's
61 ERR_peek_last_error() returns the latest error code from the thread's
/openssl/doc/internal/man3/
H A Dossl_init_thread_deregister.pod8 - internal thread routines
23 Thread aware code may be informed about when a thread is stopping, typically to
29 Thread aware code registers a "stop handler" for each new thread that it uses.
30 Typically, when a new thread is being used, code will add a new value to some
31 thread local variable and then register a stop handler. When the thread is
32 stopping the stop handler is called (while on that thread) and the code can
33 clean up the value stored in the thread local variable.
45 This will deregister all stop handlers (no matter which thread they were
H A Dossl_rcu_lock_new.pod93 ossl_synchronize_rcu() blocks the calling thread until all read side
95 the write side thread is safe to free.
101 thread which enqueued the callback will be the thread which executes the
131 You can find out if OpenSSL was configured with thread support:
135 /* thread support enabled */
137 /* no thread support */
/openssl/include/internal/
H A Dthread_arch.h118 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread);
119 int ossl_crypto_thread_native_join(CRYPTO_THREAD *thread,
121 int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread,
124 int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread);
125 int ossl_crypto_thread_native_clean(CRYPTO_THREAD *thread);
/openssl/doc/designs/quic-design/
H A Dquic-thread-assist.md4 In thread assisted mode, we create a background thread to ensure that periodic
26 set calls, but the combination of the two would not be safe if the assist thread
38 assist thread creation).
43 It would also only be required for applications which want to use thread
50 - **2. Handshake layer always belongs to the application thread.**
52 In this model, the handshake layer “belongs” to the application thread
53 and the assist thread is never allowed to touch it:
58 - The assist thread performs a reduced tick operation which does everything
85 - **3. Handshake layer belongs to the assist thread after connection begins.**
89 thread and may not be touched further. We would need to block all API calls
[all …]
H A Derror-handling.md14 The error stacks are thread-local. Libssl API calls from separate threads
18 immediately after the API call on the same thread. There is no such thing as
29 The error stack access is not under a lock (because it is thread-local).
42 We can assume the internal assistance thread is well-behaving in regards
54 they are left on the error stack of the thread that called SSL_write()
66 Permanent errors happening within the assist thread, within SSL_tick()
74 for errors happening in the internal assistance thread. When a permanent error
80 are copied to the thread local error stack. They are always kept on
94 Multi-stream-multi-thread mode
98 multi-stream-multi-thread mode as the error stack entries are always
/openssl/doc/man7/
H A Dopenssl-threads.pod5 openssl-threads - Overview of thread safety in OpenSSL
9 In this man page, we use the term B<thread-safe> to indicate that an
18 all OpenSSL objects are thread-safe.
23 One major use of the OpenSSL thread API is to implement reference counting.
45 Get methods are often thread-safe as long as the ownership requirements are
47 Set methods, or modifying shared objects, are generally not thread-safe
50 Objects are thread-safe
59 Another instance of thread-safety is when updates to an object's
63 In all cases, however, it is generally not safe for one thread to
65 while another thread is using that object, such as verifying a signature.
[all …]
H A DEVP_RAND.pod42 Multiple DRBG instances which are accessed only by a single thread provide
80 DRBG are created per thread and accessed through thread-local storage.
83 the thread-local <public> and <private> DRBG instance, respectively.
105 It is I<not> thread-safe to access the <primary> DRBG directly via the
107 The <public> and <private> DRBG are thread-local, i.e. there is an
108 instance of each per thread. So they can safely be accessed without
113 Note that it is not allowed to store a pointer to one of the thread-local
118 because they are intended to be used by a single thread.
121 thread. Using the <primary> DRBG as entropy source for multiple DRBG
122 instances on different threads is thread-safe, because the DRBG instance
[all …]
/openssl/.github/workflows/
H A Drun-checker-ci.yml36 no-thread-pool,
37 no-default-thread-pool,

Completed in 46 milliseconds

1234