argon2: Don't call _endthreadex/pthread_exit

Returning from the thread creation function is documented to be a valid
way of exiting a thread on both Windows and pthread systems. Removing
the explicit call avoids the need to install libgcc_s.so in initramfs
for glibc systems, and slightly reduces code size.

Upstream: https://github.com/P-H-C/phc-winner-argon2/pull/331
This commit is contained in:
Alex Xu (Hello71)
2021-12-16 10:42:27 -05:00
committed by Milan Broz
parent 903dae1b6c
commit 46efbc0a36
3 changed files with 0 additions and 14 deletions

View File

@@ -46,12 +46,4 @@ int argon2_thread_join(argon2_thread_handle_t handle) {
#endif
}
void argon2_thread_exit(void) {
#if defined(_WIN32)
_endthreadex(0);
#else
pthread_exit(NULL);
#endif
}
#endif /* ARGON2_NO_THREADS */