More return types...

This commit is contained in:
mycroft 1994-05-04 11:04:58 +00:00
parent 4cce672e7d
commit b4719466f8
1 changed files with 28 additions and 10 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1982, 1986, 1988, 1990 Regents of the University of California.
* All rights reserved.
* Copyright (c) 1982, 1986, 1988, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -30,8 +30,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)uipc_socket2.c 7.17 (Berkeley) 5/4/91
* $Id: uipc_socket2.c,v 1.6 1994/04/25 08:08:58 mycroft Exp $
* from: @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
* $Id: uipc_socket2.c,v 1.7 1994/05/04 11:04:58 mycroft Exp $
*/
#include <sys/param.h>
@ -87,6 +87,7 @@ u_long sb_max = SB_MAX; /* patchable */
* cause software-interrupt process scheduling.
*/
void
soisconnecting(so)
register struct socket *so;
{
@ -95,6 +96,7 @@ soisconnecting(so)
so->so_state |= SS_ISCONNECTING;
}
void
soisconnected(so)
register struct socket *so;
{
@ -113,6 +115,7 @@ soisconnected(so)
}
}
void
soisdisconnecting(so)
register struct socket *so;
{
@ -124,6 +127,7 @@ soisdisconnecting(so)
sorwakeup(so);
}
void
soisdisconnected(so)
register struct socket *so;
{
@ -183,6 +187,7 @@ sonewconn1(head, connstatus)
return (so);
}
void
soqinsque(head, so, q)
register struct socket *head, *so;
int q;
@ -204,6 +209,7 @@ soqinsque(head, so, q)
*prev = so;
}
int
soqremque(so, q)
register struct socket *so;
int q;
@ -260,13 +266,10 @@ socantrcvmore(so)
sorwakeup(so);
}
/*
* Socket select/wakeup routines.
*/
/*
* Wait for data to arrive at/drain from a socket buffer.
*/
int
sbwait(sb)
struct sockbuf *sb;
{
@ -281,6 +284,7 @@ sbwait(sb)
* Lock a sockbuf already known to be locked;
* return any error returned from sleep (EINTR).
*/
int
sb_lock(sb)
register struct sockbuf *sb;
{
@ -302,6 +306,7 @@ sb_lock(sb)
* Do asynchronous notification via SIGIO
* if the socket has the SS_ASYNC flag set.
*/
void
sowakeup(so, sb)
register struct socket *so;
register struct sockbuf *sb;
@ -354,6 +359,7 @@ sowakeup(so, sb)
* should be released by calling sbrelease() when the socket is destroyed.
*/
int
soreserve(so, sndcc, rcvcc)
register struct socket *so;
u_long sndcc, rcvcc;
@ -381,6 +387,7 @@ bad:
* Attempt to scale mbmax so that mbcnt doesn't become limiting
* if buffering efficiency is near the normal case.
*/
int
sbreserve(sb, cc)
struct sockbuf *sb;
u_long cc;
@ -398,6 +405,7 @@ sbreserve(sb, cc)
/*
* Free mbufs held by a socket, and reserved mbuf space.
*/
void
sbrelease(sb)
struct sockbuf *sb;
{
@ -437,6 +445,7 @@ sbrelease(sb)
* the mbuf chain is recorded in sb. Empty mbufs are
* discarded and mbufs are compacted where possible.
*/
void
sbappend(sb, m)
struct sockbuf *sb;
struct mbuf *m;
@ -459,6 +468,7 @@ sbappend(sb, m)
}
#ifdef SOCKBUF_DEBUG
void
sbcheck(sb)
register struct sockbuf *sb;
{
@ -485,6 +495,7 @@ sbcheck(sb)
* As above, except the mbuf chain
* begins a new record.
*/
void
sbappendrecord(sb, m0)
register struct sockbuf *sb;
register struct mbuf *m0;
@ -519,6 +530,7 @@ sbappendrecord(sb, m0)
* is inserted at the beginning of the sockbuf,
* but after any other OOB data.
*/
void
sbinsertoob(sb, m0)
register struct sockbuf *sb;
register struct mbuf *m0;
@ -563,6 +575,7 @@ sbinsertoob(sb, m0)
* m0 must include a packet header with total length.
* Returns 0 if no space in sockbuf or insufficient mbufs.
*/
int
sbappendaddr(sb, asa, m0, control)
register struct sockbuf *sb;
struct sockaddr *asa;
@ -605,9 +618,10 @@ panic("sbappendaddr");
return (1);
}
int
sbappendcontrol(sb, m0, control)
struct sockbuf *sb;
struct mbuf *control, *m0;
struct mbuf *m0, *control;
{
register struct mbuf *m, *n;
int space = 0;
@ -641,6 +655,7 @@ sbappendcontrol(sb, m0, control)
* buffer sb following mbuf n. If n
* is null, the buffer is presumed empty.
*/
void
sbcompress(sb, m, n)
register struct sockbuf *sb;
register struct mbuf *m, *n;
@ -689,6 +704,7 @@ sbcompress(sb, m, n)
* Free all mbufs in a sockbuf.
* Check that all resources are reclaimed.
*/
void
sbflush(sb)
register struct sockbuf *sb;
{
@ -704,6 +720,7 @@ sbflush(sb)
/*
* Drop data from (the front of) a sockbuf.
*/
void
sbdrop(sb, len)
register struct sockbuf *sb;
register int len;
@ -747,6 +764,7 @@ sbdrop(sb, len)
* Drop a record off the front of a sockbuf
* and move the next record to the front.
*/
void
sbdroprecord(sb)
register struct sockbuf *sb;
{