Commit Graph

17 Commits

Author SHA1 Message Date
Feoramund
8cde9dce47 Rewrite Atomic_RW_Mutex
This patch simplifies the implementation and fixes #5254.

Previously, the mutex was set up as if there could be multiple writers,
and there seemed to be some confusion as to which `Writer` bits to
check, as not all were checked or set at the same time.

This could also result in the mutex being left in a non-zero state even
after unlocking all locks.

All unneeded state has been removed and extra checks have been put in
place.
2025-06-03 09:07:38 -04:00
Laytan Laats
f1cae8d844 fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour) 2024-12-06 23:08:47 +01:00
Feoramund
0a594147af Use contextless procs in core:sync instead 2024-09-10 14:52:20 -04:00
Feoramund
cbd4d5e765 Fix data race in atomic_sema_wait_with_timeout 2024-09-09 16:19:14 -04:00
pkova
5b9b21e756 Fix thread sanitizer errors surfaced by tests/core/io 2024-09-03 16:30:51 +03:00
gingerBill
e296d6fb90 Fix loads of indentation issues with mixing spaces and tabs 2024-06-29 19:50:51 +01:00
gingerBill
e79883e4fd Add #no_copy to sync primitives 2023-04-15 15:41:30 +01:00
gingerBill
20943a81c1 Make sync calls contextless where possible 2022-12-08 15:55:53 +00:00
gingerBill
dd6337224f Correct explicit atomic orderings 2022-04-30 11:42:28 +01:00
gingerBill
d6cfb60506 Remove prev from Atomic_Cond 2022-04-27 15:29:21 +01:00
gingerBill
07d1a42768 Simplify Atomic_Sema implementation 2022-04-26 13:11:34 +01:00
gingerBill
ec8221cb5d Simplify Atomic_Cond implementation 2022-04-26 13:04:50 +01:00
gingerBill
9f2d710c35 Change intrinsics.Atomic_Memory_Order fields to use Ada_Case rather than snake_case 2022-03-31 12:57:24 +01:00
gingerBill
b2f5b73532 Rename package name to sync 2022-03-31 01:05:50 +01:00
gingerBill
6bc0c611ab Enforce success failure pairings of compare_exchange_*_explicit at compile time 2022-03-31 00:49:53 +01:00
gingerBill
ba1930eb01 Update core to use new atomic intrinsics 2022-03-31 00:22:54 +01:00
gingerBill
4eb4ae6305 Replace sync with sync2 2022-03-30 17:42:44 +01:00