mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +00:00
Perform some code cleanup
This commit is contained in:
parent
0dd9629562
commit
a4601a24d3
63 changed files with 350 additions and 1643 deletions
|
@ -41,6 +41,7 @@ void cthread_zombies_add(cthread_t td) {
|
|||
|
||||
void cthread_zombies_reap(void) {
|
||||
struct Zombie *z;
|
||||
// TODO(jart): Is this right? Update to not use malloc/free?
|
||||
while ((z = atomic_load(&cthread_zombies)) && !atomic_load(&z->td->tid)) {
|
||||
if (atomic_compare_exchange_weak(&cthread_zombies, &z, z->next)) {
|
||||
munmap(z->td->alloc.bottom, z->td->alloc.top - z->td->alloc.bottom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue