Commit Graph

17 Commits

Author SHA1 Message Date
Speedy_Lex 2d4ab41de5 Cargo fmt 2026-05-07 00:05:13 +02:00
Speedy_Lex eff610eac6 Fix many clippy lints 2026-05-07 00:05:07 +02:00
auronandace 05b8ffbcb7 import timespec from time rather than bits 2026-05-03 14:33:39 +01:00
Wildan M d16dfade59 Use less cloning for timespec 2026-05-03 03:21:06 +07:00
auronandace 49f96a96e6 rename bits_time to bits_timespec for consistency 2026-04-09 10:50:04 +01:00
Wildan M f5dd08dc49 Add and fix pthread rwlock timeout tests 2026-03-29 11:31:08 +07:00
Wildan M 928a446f12 Implement clockid_t handling to pthread_rwlock timeout 2026-03-29 10:51:04 +07:00
auronandace 1191d8e1b4 extract timespec to a bits header 2026-02-12 13:07:24 +00:00
auronandace 7d1582a555 add unused_imports lint 2026-02-10 15:55:32 +00:00
Anhad Singh 5eeb59dad2 feat(rand48): rwlock for global params
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 01:23:20 +11:00
Anhad Singh cfe89f828a feat: rwlock instead of mutex for global scope
* Rwlock -> InnerRwLock
* RwLock makes use of InnerRwLock.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 00:54:52 +11:00
Derick Eddington 802748b611 Fix Rwlock::acquire_write_lock to avoid blocking indefinitely.
Without this fix, `tests/bins_static/pthread/rwlock_randtest` would sometimes get stuck blocking
forever with only 1+ threads all doing `pthread_rwlock_wrlock()` but all the other threads
having finished.
2024-07-06 22:47:55 -07:00
Jacob Lorentzon 1fba2ef10a Various futex fixes 2024-04-05 20:31:06 +00:00
4lDO2 e0a3811736 Protect fork() and clone() behind a rwlock.
rlct_clone will acquire a read lock, whereas fork will acquire a write
lock. The write lock is necessary because the fork will clone the file
table, which would result in other threads' fork/clone file descriptors
not being closed. If an address space switch fd never gets closed, fork
child processes and new threads, may never switch address spaces before
they are started, which has resulted in hard-to-debug RIP=0 instr fetch
page faults.
2024-03-27 10:30:49 +01:00
Jacob Lorentzon f7ac690c45 Fix pthread rwlock code 2024-03-26 15:46:32 +00:00
4lDO2 cdd0f67b23 Rustfmt. 2023-05-17 15:28:10 +02:00
4lDO2 439b054486 Rustify pthread_rwlock_t. 2023-05-06 17:02:54 +02:00