sys_pipe.c (9c00bb9190391479885cfb14ed23fb7003d10109) sys_pipe.c (6aba400a7055ed2427c6aa297774fb91f5d8db79)
1/*-
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 1503 unchanged lines hidden (view full) ---

1512
1513 /*
1514 * knlist_clear() may sleep dropping the PIPE_MTX. Set the
1515 * PIPE_FINALIZED, that allows other end to free the
1516 * pipe_pair, only after the knotes are completely dismantled.
1517 */
1518 knlist_clear(&cpipe->pipe_sel.si_note, 1);
1519 cpipe->pipe_present = PIPE_FINALIZED;
1/*-
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 1503 unchanged lines hidden (view full) ---

1512
1513 /*
1514 * knlist_clear() may sleep dropping the PIPE_MTX. Set the
1515 * PIPE_FINALIZED, that allows other end to free the
1516 * pipe_pair, only after the knotes are completely dismantled.
1517 */
1518 knlist_clear(&cpipe->pipe_sel.si_note, 1);
1519 cpipe->pipe_present = PIPE_FINALIZED;
1520 seldrain(&cpipe->pipe_sel);
1520 knlist_destroy(&cpipe->pipe_sel.si_note);
1521
1522 /*
1523 * If both endpoints are now closed, release the memory for the
1524 * pipe pair. If not, unlock.
1525 */
1526 if (ppipe->pipe_present == PIPE_FINALIZED) {
1527 PIPE_UNLOCK(cpipe);

--- 98 unchanged lines hidden ---
1521 knlist_destroy(&cpipe->pipe_sel.si_note);
1522
1523 /*
1524 * If both endpoints are now closed, release the memory for the
1525 * pipe pair. If not, unlock.
1526 */
1527 if (ppipe->pipe_present == PIPE_FINALIZED) {
1528 PIPE_UNLOCK(cpipe);

--- 98 unchanged lines hidden ---