diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-02-28 00:02:41 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | cff67f93caeb3f98261860904dd232f6b551299e (patch) | |
tree | 94715ee98cc0ea62ea60da96b8b2d3a595b5276e /src/compiler.c | |
parent | 0ed62b9337c64a91481afd91f9e5706a36eca7b5 (diff) |
fix crashes
Diffstat (limited to 'src/compiler.c')
-rw-r--r-- | src/compiler.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler.c b/src/compiler.c index 6f1c954..3e04ef2 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -88,7 +88,6 @@ static CHECK_RESULT int amal_compiler_load_first_this_thread(amal_compiler *self return_if_error(parser_init(&parser, self, allocator)); cleanup_if_error(parser_parse_file(&parser, filepath)); - amal_log_debug("Finished parsing in thread"); cleanup_if_error(amal_mutex_lock(&self->mutex, "amal_compiler_load_first_this_thread")); cleanup_if_error(buffer_append(&self->parsers, &parser, sizeof(parser))); result = AMAL_COMPILER_OK; @@ -109,7 +108,6 @@ static void* thread_callback_parse_file(void *userdata) { am_memcpy(&compiler_parser_userdata, userdata, sizeof(compiler_parser_userdata)); am_free(userdata); - amal_log_debug("Thread start parse file"); cleanup_if_error(amal_compiler_load_first_this_thread(compiler_parser_userdata.compiler, compiler_parser_userdata.filepath, &compiler_parser_userdata.parser_thread_data->allocator)); @@ -118,7 +116,6 @@ static void* thread_callback_parse_file(void *userdata) { _ = buffer_pop(&compiler_parser_userdata.compiler->queued_files, &next_file, sizeof(next_file)); cleanup: - amal_log_debug("Thread finished, next file: %s", next_file.data ? "yes" : "no"); if(!next_file.data) compiler_parser_userdata.parser_thread_data->status = PARSER_THREAD_STATUS_IDLE; amal_mutex_tryunlock(&compiler_parser_userdata.compiler->mutex); @@ -170,7 +167,7 @@ static CHECK_RESULT int amal_compiler_load_file_join_threads(amal_compiler *self result = AMAL_COMPILER_ERR; (void)_; assert(amal_thread_is_main()); - + for(i = 0; i < self->usable_thread_count; ++i) { cleanup_if_error(amal_mutex_lock(&self->mutex, "amal_compiler_load_file_join_threads, waiting for workers")); parser_thread_data = &self->threads[i]; |