* ProcessClientReadInterrupt() - Process interrupts specific to client reads * * This is called just before and after low-level reads. * 'blocked' is true if no data was available to read and we plan to retry, * false if about to read or done reading. * * Must preserve errno! */
| 637 | * Must preserve errno! |
| 638 | */ |
| 639 | void |
| 640 | ProcessClientReadInterrupt(bool blocked) |
| 641 | { |
| 642 | int save_errno = errno; |
| 643 | |
| 644 | if (DoingCommandRead) |
| 645 | { |
| 646 | /* Check for general interrupts that arrived before/while reading */ |
| 647 | CHECK_FOR_INTERRUPTS(); |
| 648 | |
| 649 | /* Process sinval catchup interrupts, if any */ |
| 650 | if (catchupInterruptPending) |
| 651 | ProcessCatchupInterrupt(); |
| 652 | |
| 653 | /* Process notify interrupts, if any */ |
| 654 | if (notifyInterruptPending) |
| 655 | ProcessNotifyInterrupt(true); |
| 656 | } |
| 657 | else if (ProcDiePending) |
| 658 | { |
| 659 | /* |
| 660 | * We're dying. If there is no data available to read, then it's safe |
| 661 | * (and sane) to handle that now. If we haven't tried to read yet, |
| 662 | * make sure the process latch is set, so that if there is no data |
| 663 | * then we'll come back here and die. If we're done reading, also |
| 664 | * make sure the process latch is set, as we might've undesirably |
| 665 | * cleared it while reading. |
| 666 | */ |
| 667 | if (blocked) |
| 668 | CHECK_FOR_INTERRUPTS(); |
| 669 | else |
| 670 | SetLatch(MyLatch); |
| 671 | } |
| 672 | |
| 673 | errno = save_errno; |
| 674 | } |
| 675 | |
| 676 | /* |
| 677 | * ProcessClientWriteInterrupt() - Process interrupts specific to client writes |
no test coverage detected