| 549 | } |
| 550 | |
| 551 | void |
| 552 | SyncRepCleanupAtProcExit(void) |
| 553 | { |
| 554 | /* |
| 555 | * First check if we are removed from the queue without the lock to not |
| 556 | * slow down backend exit. |
| 557 | */ |
| 558 | if (!SHMQueueIsDetached(&(MyProc->syncRepLinks))) |
| 559 | { |
| 560 | LWLockAcquire(SyncRepLock, LW_EXCLUSIVE); |
| 561 | |
| 562 | /* maybe we have just been removed, so recheck */ |
| 563 | if (!SHMQueueIsDetached(&(MyProc->syncRepLinks))) |
| 564 | SHMQueueDelete(&(MyProc->syncRepLinks)); |
| 565 | |
| 566 | LWLockRelease(SyncRepLock); |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | /* |
| 571 | * =========================================================== |
no test coverage detected