| 515 | !BufferIsInvalid(buf->buf_id+1)) |
| 516 | |
| 517 | static inline void BufferMProtect(volatile BufferDesc *bufHdr, int protectionLevel) |
| 518 | { |
| 519 | if (ShouldMemoryProtect(bufHdr)) |
| 520 | { |
| 521 | if (mprotect(BufHdrGetBlock(bufHdr), BLCKSZ, protectionLevel)) |
| 522 | { |
| 523 | ereport(ERROR, |
| 524 | (errmsg("unable to set memory level to %d, error %d, " |
| 525 | "block size %d, ptr %ld", protectionLevel, |
| 526 | errno, BLCKSZ, (long int) BufHdrGetBlock(bufHdr)))); |
| 527 | } |
| 528 | } |
| 529 | } |
| 530 | #endif |
| 531 | |
| 532 | static inline void ReleaseContentLock(volatile BufferDesc *buf) |
no test coverage detected