1/* 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 |
34 * $Id: uipc_syscalls.c,v 1.9 1995/10/23 15:42:12 bde Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/sysproto.h> 40#include <sys/filedesc.h> 41#include <sys/proc.h> 42#include <sys/file.h> --- 144 unchanged lines hidden (view full) --- 187 return (EWOULDBLOCK); 188 } 189 while (so->so_qlen == 0 && so->so_error == 0) { 190 if (so->so_state & SS_CANTRCVMORE) { 191 so->so_error = ECONNABORTED; 192 break; 193 } 194 error = tsleep((caddr_t)&so->so_timeo, PSOCK | PCATCH, |
195 "accept", 0); |
196 if (error) { 197 splx(s); 198 return (error); 199 } 200 } 201 if (so->so_error) { 202 error = so->so_error; 203 so->so_error = 0; --- 88 unchanged lines hidden (view full) --- 292 goto bad; 293 if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) { 294 m_freem(nam); 295 return (EINPROGRESS); 296 } 297 s = splnet(); 298 while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { 299 error = tsleep((caddr_t)&so->so_timeo, PSOCK | PCATCH, |
300 "connec", 0); |
301 if (error) 302 break; 303 } 304 if (error == 0) { 305 error = so->so_error; 306 so->so_error = 0; 307 } 308 splx(s); --- 964 unchanged lines hidden --- |