rtld: add nanosleep(2) to rtld-libc rtld: handle parallel init calls If more than one thread dlopen(3)s the same DSO, we might return success from one of the dlopen(3) calls without completing initializers in another dlopen(3), which is problematic. I see no better solution for this except busy-waiting until init is done. Directly using umtx_op(2) would break compat with libc_r even more. Note that in case of two threads executing constructors that call dlopen() on something that needs the other's object, would now spin there forever. This is the problem of the user code anyway.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped