update linux file exchange stuff so it works with >32 files
This commit is contained in:
parent
08b69a6630
commit
1f415d13fc
|
@ -2571,19 +2571,22 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert(d == exchange_vars.file.num_active);
|
int free_list_count = 0;
|
||||||
|
|
||||||
for (file = exchange_vars.file.free_list.next;
|
for (file = exchange_vars.file.free_list.next;
|
||||||
file != &exchange_vars.file.free_list;
|
file != &exchange_vars.file.free_list;
|
||||||
file = file->next){
|
file = file->next){
|
||||||
|
++free_list_count;
|
||||||
if (file->data){
|
if (file->data){
|
||||||
system_free_memory(file->data);
|
system_free_memory(file->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exchange_vars.file.free_list.next != &exchange_vars.file.free_list){
|
if (exchange_vars.file.free_list.next != &exchange_vars.file.free_list){
|
||||||
|
Assert(free_list_count != 0);
|
||||||
ex__insert_range(exchange_vars.file.free_list.next, exchange_vars.file.free_list.prev,
|
ex__insert_range(exchange_vars.file.free_list.next, exchange_vars.file.free_list.prev,
|
||||||
&exchange_vars.file.available);
|
&exchange_vars.file.available);
|
||||||
|
|
||||||
|
exchange_vars.file.num_active -= free_list_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
ex__check(&exchange_vars.file);
|
ex__check(&exchange_vars.file);
|
||||||
|
|
Loading…
Reference in New Issue