xref: /openssl/crypto/thread/arch/thread_none.c (revision da1c088f)
1 /*
2  * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9 
10 #include <internal/thread_arch.h>
11 
12 #if defined(OPENSSL_THREADS_NONE)
13 
ossl_crypto_thread_native_spawn(CRYPTO_THREAD * thread)14 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread)
15 {
16     return 0;
17 }
18 
ossl_crypto_thread_native_perform_join(CRYPTO_THREAD * thread,CRYPTO_THREAD_RETVAL * retval)19 int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread, CRYPTO_THREAD_RETVAL *retval)
20 {
21     return 0;
22 }
23 
ossl_crypto_thread_native_exit(void)24 int ossl_crypto_thread_native_exit(void)
25 {
26     return 0;
27 }
28 
ossl_crypto_thread_native_is_self(CRYPTO_THREAD * thread)29 int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread)
30 {
31     return 0;
32 }
33 
ossl_crypto_mutex_new(void)34 CRYPTO_MUTEX *ossl_crypto_mutex_new(void)
35 {
36     return NULL;
37 }
38 
ossl_crypto_mutex_lock(CRYPTO_MUTEX * mutex)39 void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex)
40 {
41 }
42 
ossl_crypto_mutex_try_lock(CRYPTO_MUTEX * mutex)43 int ossl_crypto_mutex_try_lock(CRYPTO_MUTEX *mutex)
44 {
45     return 0;
46 }
47 
ossl_crypto_mutex_unlock(CRYPTO_MUTEX * mutex)48 void ossl_crypto_mutex_unlock(CRYPTO_MUTEX *mutex)
49 {
50 }
51 
ossl_crypto_mutex_free(CRYPTO_MUTEX ** mutex)52 void ossl_crypto_mutex_free(CRYPTO_MUTEX **mutex)
53 {
54 }
55 
ossl_crypto_condvar_new(void)56 CRYPTO_CONDVAR *ossl_crypto_condvar_new(void)
57 {
58     return NULL;
59 }
60 
ossl_crypto_condvar_wait(CRYPTO_CONDVAR * cv,CRYPTO_MUTEX * mutex)61 void ossl_crypto_condvar_wait(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex)
62 {
63 }
64 
ossl_crypto_condvar_wait_timeout(CRYPTO_CONDVAR * cv,CRYPTO_MUTEX * mutex,OSSL_TIME deadline)65 void ossl_crypto_condvar_wait_timeout(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex,
66                                       OSSL_TIME deadline)
67 {
68 }
69 
ossl_crypto_condvar_broadcast(CRYPTO_CONDVAR * cv)70 void ossl_crypto_condvar_broadcast(CRYPTO_CONDVAR *cv)
71 {
72 }
73 
ossl_crypto_condvar_signal(CRYPTO_CONDVAR * cv)74 void ossl_crypto_condvar_signal(CRYPTO_CONDVAR *cv)
75 {
76 }
77 
ossl_crypto_condvar_free(CRYPTO_CONDVAR ** cv)78 void ossl_crypto_condvar_free(CRYPTO_CONDVAR **cv)
79 {
80 }
81 
82 #endif
83