MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pipe_destroy_write_buffer

Function pipe_destroy_write_buffer

freebsd/kern/sys_pipe.c:915–928  ·  view source on GitHub ↗

* Unwire the process buffer. */

Source from the content-addressed store, hash-verified

913 * Unwire the process buffer.
914 */
915static void
916pipe_destroy_write_buffer(struct pipe *wpipe)
917{
918
919 PIPE_LOCK_ASSERT(wpipe, MA_OWNED);
920 KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0,
921 ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe));
922 KASSERT(wpipe->pipe_pages.cnt == 0,
923 ("%s: pipe map for %p contains residual data", __func__, wpipe));
924
925 wpipe->pipe_state &= ~PIPE_DIRECTW;
926 vm_page_unhold_pages(wpipe->pipe_pages.ms, wpipe->pipe_pages.npages);
927 wpipe->pipe_pages.npages = 0;
928}
929
930/*
931 * In the case of a signal, the writing process might go away. This

Callers 2

pipe_clone_write_bufferFunction · 0.85
pipe_direct_writeFunction · 0.85

Calls 1

vm_page_unhold_pagesFunction · 0.85

Tested by

no test coverage detected