Commit bf447e2
authored
[llvm/Support] Make
This patch extends the `llvm::sys::RWMutex` class to fullfill the
`Lockable` requirement to include attempted locking, by implementing a
`bool try_lock` member function.
As the name suggests, this method will try to acquire to lock in a
non-blocking fashion and release it immediately. If it managed to
acquire the lock, returns `true`, otherwise returns `false`.
Signed-off-by: Med Ismail Bennani <[email protected]>llvm::sys::RWMutex Lockable (#90667)1 parent e98cb36 commit bf447e2
2 files changed
+38
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| 134 | + | |
| 135 | + | |
126 | 136 | | |
127 | 137 | | |
128 | 138 | | |
| |||
148 | 158 | | |
149 | 159 | | |
150 | 160 | | |
| 161 | + | |
| 162 | + | |
151 | 163 | | |
152 | 164 | | |
153 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| |||
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
126 | 148 | | |
127 | 149 | | |
128 | 150 | | |
| |||
131 | 153 | | |
132 | 154 | | |
133 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
134 | 160 | | |
135 | 161 | | |
136 | 162 | | |
0 commit comments