summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/netinet/in_pcb.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index c967851..0b54024 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -136,10 +136,10 @@ SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
* Allocate a PCB and associate it with the socket.
*/
int
-in_pcballoc(so, pcbinfo, p)
+in_pcballoc(so, pcbinfo, td)
struct socket *so;
struct inpcbinfo *pcbinfo;
- struct proc *p;
+ struct thread *td;
{
register struct inpcb *inp;
#ifdef IPSEC
@@ -175,11 +175,12 @@ in_pcballoc(so, pcbinfo, p)
}
int
-in_pcbbind(inp, nam, p)
+in_pcbbind(inp, nam, td)
register struct inpcb *inp;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
+ struct proc *p = td->td_proc;
register struct socket *so = inp->inp_socket;
unsigned short *lastport;
struct sockaddr_in *sin;
@@ -494,10 +495,10 @@ in_pcbladdr(inp, nam, plocal_sin)
* then pick one.
*/
int
-in_pcbconnect(inp, nam, p)
+in_pcbconnect(inp, nam, td)
register struct inpcb *inp;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
struct sockaddr_in *ifaddr;
struct sockaddr_in *sin = (struct sockaddr_in *)nam;
@@ -511,7 +512,7 @@ in_pcbconnect(inp, nam, p)
sa.sin_addr.s_addr = htonl(cred->cr_prison->pr_ip);
sa.sin_len=sizeof (sa);
sa.sin_family = AF_INET;
- error = in_pcbbind(inp, (struct sockaddr *)&sa, p);
+ error = in_pcbbind(inp, (struct sockaddr *)&sa, td);
if (error)
return (error);
}
@@ -528,7 +529,7 @@ in_pcbconnect(inp, nam, p)
}
if (inp->inp_laddr.s_addr == INADDR_ANY) {
if (inp->inp_lport == 0) {
- error = in_pcbbind(inp, (struct sockaddr *)0, p);
+ error = in_pcbbind(inp, (struct sockaddr *)0, td);
if (error)
return (error);
}
OpenPOWER on IntegriCloud