|
@ -715,9 +715,6 @@ VOID_TASK_1(lace_steal_loop, int*, quit) |
|
|
} while (__lace_worker->enabled == 0); |
|
|
} while (__lace_worker->enabled == 0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Unmap the virtual memory from the worker. |
|
|
|
|
|
munmap(workers_memory[worker_id], workers_memory_size); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -1091,6 +1088,12 @@ void lace_exit() |
|
|
lace_resume(); |
|
|
lace_resume(); |
|
|
lace_barrier(); |
|
|
lace_barrier(); |
|
|
|
|
|
|
|
|
|
|
|
// Free the memory of the workers. |
|
|
|
|
|
for (unsigned int i=0; i<n_workers; i++) munmap(workers_memory[i], workers_memory_size); |
|
|
|
|
|
free(workers_memory); |
|
|
|
|
|
free(workers); |
|
|
|
|
|
free(workers_p); |
|
|
|
|
|
|
|
|
// finally, destroy the barriers |
|
|
// finally, destroy the barriers |
|
|
lace_barrier_destroy(); |
|
|
lace_barrier_destroy(); |
|
|
pthread_barrier_destroy(&suspend_barrier); |
|
|
pthread_barrier_destroy(&suspend_barrier); |
|
|