mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
refactor stdio open file list handling, move it out of global libc struct
functions which open in-memory FILE stream variants all shared a tail with __fdopen, adding the FILE structure to stdio's open file list. replacing this common tail with a function call reduces code size and duplication of logic. the list is also partially encapsulated now. function signatures were chosen to facilitate tail call optimization and reduce the need for additional accessor functions. with these changes, static linked programs that do not use stdio no longer have an open file list at all.
This commit is contained in:
@ -17,8 +17,6 @@ struct __libc {
|
||||
int secure;
|
||||
volatile int threads_minus_1;
|
||||
size_t *auxv;
|
||||
FILE *ofl_head;
|
||||
volatile int ofl_lock[2];
|
||||
size_t tls_size;
|
||||
size_t page_size;
|
||||
struct __locale_struct global_locale;
|
||||
|
Reference in New Issue
Block a user