klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

Implement locking for `stdio` streams #264

Open klange opened 1 year ago

klange commented 1 year ago

The libc's stdio implementation is not thread-safe. This is a deficiency that has been known since it was first written, and one that is starting to bite us in user reports. Correct this by adding locks to streams.