thread_none.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. #include <internal/thread_arch.h>
  10. #if defined(OPENSSL_THREADS_NONE)
  11. int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread)
  12. {
  13. return 0;
  14. }
  15. int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread, CRYPTO_THREAD_RETVAL *retval)
  16. {
  17. return 0;
  18. }
  19. int ossl_crypto_thread_native_exit(void)
  20. {
  21. return 0;
  22. }
  23. int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread)
  24. {
  25. return 0;
  26. }
  27. CRYPTO_MUTEX *ossl_crypto_mutex_new(void)
  28. {
  29. return NULL;
  30. }
  31. void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex)
  32. {
  33. }
  34. int ossl_crypto_mutex_try_lock(CRYPTO_MUTEX *mutex)
  35. {
  36. return 0;
  37. }
  38. void ossl_crypto_mutex_unlock(CRYPTO_MUTEX *mutex)
  39. {
  40. }
  41. void ossl_crypto_mutex_free(CRYPTO_MUTEX **mutex)
  42. {
  43. }
  44. CRYPTO_CONDVAR *ossl_crypto_condvar_new(void)
  45. {
  46. return NULL;
  47. }
  48. void ossl_crypto_condvar_wait(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex)
  49. {
  50. }
  51. void ossl_crypto_condvar_wait_timeout(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex,
  52. OSSL_TIME deadline)
  53. {
  54. }
  55. void ossl_crypto_condvar_broadcast(CRYPTO_CONDVAR *cv)
  56. {
  57. }
  58. void ossl_crypto_condvar_signal(CRYPTO_CONDVAR *cv)
  59. {
  60. }
  61. void ossl_crypto_condvar_free(CRYPTO_CONDVAR **cv)
  62. {
  63. }
  64. #endif