libc: io: implement file io buffering and internal locking for concurrency
This commit is contained in:
@@ -143,6 +143,12 @@ struct __opaque_file *fopen(const char *path, const char *mode)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (fflags & FILE_BIN) {
|
||||
out->f_buffer_mode = _IOFBF;
|
||||
} else {
|
||||
out->f_buffer_mode = _IOLBF;
|
||||
}
|
||||
|
||||
out->f_fd = fd;
|
||||
out->f_flags = fflags;
|
||||
__set_errno(SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user