... to the critical section.
- a limited form of concurrency implemented with fcntl(F_SETLKW)
- readers are not blocked while dirty pages accumulate in a writers cache
- writer waits for readers to call bt_detach() before any write to the file.
- bt_attach() in a reader succeeds when the writer leaves its critical section.
- no starvation in a scenario with ten writers and ten readers.
- tested with musl libc, less than 40K for a statically linked test program.