diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-22 00:59:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | d6f368a3f400fea3e89280262a8147e7ce5d855c (patch) | |
tree | 4eb64eb0d18dad1e40c70a5bff974fe8033fe389 /src/std/thread.c | |
parent | df640dc7f55fef962b598562e10d8dd4d60fedc0 (diff) |
Move thread work from compiler/parser to thread_work file, fix use after free bug in multithreaded parser allocator
Diffstat (limited to 'src/std/thread.c')
-rw-r--r-- | src/std/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/std/thread.c b/src/std/thread.c index fb0e9ab..87362d2 100644 --- a/src/std/thread.c +++ b/src/std/thread.c @@ -107,13 +107,13 @@ int amal_thread_join(amal_thread *self, void **result) { return 0; } -void amal_mutex_init(amal_mutex *self) { - pthread_mutex_init(&self->mutex, NULL); +int amal_mutex_init(amal_mutex *self) { #ifdef AMAL_MUTEX_DEBUG self->lock_identifier = NULL; #endif self->locked = bool_false; self->owner_thread = 0; + return pthread_mutex_init(&self->mutex, NULL); } void amal_mutex_deinit(amal_mutex *self) { |