forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc32fcac
committed
Add RISC-V spinlock support in s_lock.h.
Like the ARM case, just use gcc's __sync_lock_test_and_set();that will compile into AMOSWAP.W.AQ which does what we need.At some point it might be worth doing some work on atomic opsfor RISC-V, but this should be enough for a creditable port.Back-patch to all supported branches, just in case somebodywants to try them on RISC-V.Marek SzubaDiscussion:https://postgr.es/m/dea97b6d-f55f-1f6d-9109-504aa7dfa421@gentoo.org1 parent4279e5b commitc32fcac
1 file changed
+24
-0
lines changedLines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
| 317 | + | |
317 | 318 |
| |
318 | 319 |
| |
319 | 320 |
| |
| |||
340 | 341 |
| |
341 | 342 |
| |
342 | 343 |
| |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
343 | 367 |
| |
344 | 368 |
| |
345 | 369 |
| |
|
0 commit comments
Comments
(0)