Correct atomic usage

This commit is contained in:
gingerBill
2021-08-19 17:51:19 +01:00
parent a90fe7211c
commit fa4f3aa7ad
3 changed files with 20 additions and 12 deletions
+8
View File
@@ -4176,6 +4176,10 @@ void check_with_workers(Checker *c, ThreadProc *proc, isize total_count) {
semaphore_wait(&c->info.collect_semaphore);
for (isize i = 0; i < worker_count; i++) {
thread_join(threads+i);
}
for (isize i = 0; i < worker_count; i++) {
thread_destroy(threads+i);
}
@@ -4811,6 +4815,10 @@ void check_procedure_bodies(Checker *c) {
semaphore_wait(&c->procs_to_check_semaphore);
for (isize i = 0; i < worker_count; i++) {
thread_join(threads+i);
}
for (isize i = 0; i < worker_count; i++) {
thread_destroy(threads+i);
}