Commit 9b8ca64
committed
Utility: add a Windows path to the synchronisation support
Use a `SRWLOCK` on Windows to support locking. Slim Reader-Writer locks
are lightweight mutexes that closely resemble `pthread_mutex_t` in
functionality. While possible to use `WaitOnAddress` to implement
`os_unfair_lock`, that would be more complex and a slightly heavier
mutex as a starting point seems reasonable. If it turns out that the
performance really requires an even lighter weight locking primitive, we
can refine this to `WaitOnAddress` subsequently.1 parent 75477a6 commit 9b8ca64
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| |||
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
105 | 119 | | |
106 | 120 | | |
107 | 121 | | |
| |||
0 commit comments