Implement RwLock<T>
The RwLock
-with-payload from Rust's std
is an ergonomic way of guarding data that needs certain kinds of multithreaded access. relibc currently has only sync::rwlock::Rwlock
without payload.
Having the familiar RwLock<T>
, or something roughly similar, available would make it easier to implement some parts of relibc in safe Rust. As a specific example, the *rand48 functions use some global state with both read and write access, depending on the function.