uipc_syscalls.c (d99b0dd2c529785b308dffb9598efdc8a80e580e) uipc_syscalls.c (5e20f43d31ed44a5b770dc4757a1517aa62fa244)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * sendfile(2) and related extensions:
6 * Copyright (c) 1998, David Greenman. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

1961#endif
1962
1963 /* If headers are specified copy them into mbufs. */
1964 if (hdr_uio != NULL) {
1965 hdr_uio->uio_td = td;
1966 hdr_uio->uio_rw = UIO_WRITE;
1967 if (hdr_uio->uio_resid > 0) {
1968 m = m_uiotombuf(hdr_uio, (mnw ? M_NOWAIT : M_WAITOK),
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * sendfile(2) and related extensions:
6 * Copyright (c) 1998, David Greenman. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

1961#endif
1962
1963 /* If headers are specified copy them into mbufs. */
1964 if (hdr_uio != NULL) {
1965 hdr_uio->uio_td = td;
1966 hdr_uio->uio_rw = UIO_WRITE;
1967 if (hdr_uio->uio_resid > 0) {
1968 m = m_uiotombuf(hdr_uio, (mnw ? M_NOWAIT : M_WAITOK),
1969 0, 0);
1969 0, 0, 0);
1970 if (m == NULL) {
1971 error = mnw ? EAGAIN : ENOBUFS;
1972 goto done;
1973 }
1970 if (m == NULL) {
1971 error = mnw ? EAGAIN : ENOBUFS;
1972 goto done;
1973 }
1974 /* XXX: This should not be a header mbuf. */
1975 m_demote(m, 0);
1976 headersize = hdr_uio->uio_resid;
1977 if (compat)
1978 sbytes += headersize;
1979 }
1980 }
1981
1982 /* Protect against multiple writers to the socket. */
1983 SOCKBUF_LOCK(&so->so_snd);

--- 340 unchanged lines hidden ---
1974 headersize = hdr_uio->uio_resid;
1975 if (compat)
1976 sbytes += headersize;
1977 }
1978 }
1979
1980 /* Protect against multiple writers to the socket. */
1981 SOCKBUF_LOCK(&so->so_snd);

--- 340 unchanged lines hidden ---