summaryrefslogtreecommitdiffstats
path: root/sys/netipx
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/netipx
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/netipx')
-rw-r--r--sys/netipx/ipx.c6
-rw-r--r--sys/netipx/ipx_ip.c4
-rw-r--r--sys/netipx/ipx_pcb.c16
-rw-r--r--sys/netipx/ipx_pcb.h6
-rw-r--r--sys/netipx/ipx_usrreq.c42
-rw-r--r--sys/netipx/ipx_var.h4
-rw-r--r--sys/netipx/spx_usrreq.c50
7 files changed, 64 insertions, 64 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c
index 6dfc32f..2727875 100644
--- a/sys/netipx/ipx.c
+++ b/sys/netipx/ipx.c
@@ -59,12 +59,12 @@ static int ipx_ifinit(struct ifnet *ifp, struct ipx_ifaddr *ia,
* Generic internet control operations (ioctl's).
*/
int
-ipx_control(so, cmd, data, ifp, p)
+ipx_control(so, cmd, data, ifp, td)
struct socket *so;
u_long cmd;
caddr_t data;
register struct ifnet *ifp;
- struct proc *p;
+ struct thread *td;
{
register struct ifreq *ifr = (struct ifreq *)data;
register struct ipx_aliasreq *ifra = (struct ipx_aliasreq *)data;
@@ -108,7 +108,7 @@ ipx_control(so, cmd, data, ifp, p)
return (0);
}
- if (p && (error = suser(p)) != 0)
+ if (td && (error = suser_td(td)) != 0)
return (error);
switch (cmd) {
diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c
index d4c9693..4dea458 100644
--- a/sys/netipx/ipx_ip.c
+++ b/sys/netipx/ipx_ip.c
@@ -384,14 +384,14 @@ ipxip_route(so, sopt)
ifr_ipxip.ifr_name[4] = '0' + ipxipif.if_unit - 1;
ifr_ipxip.ifr_dstaddr = *(struct sockaddr *)ipx_dst;
ipx_control(so, (int)SIOCSIFDSTADDR, (caddr_t)&ifr_ipxip,
- (struct ifnet *)ifn, sopt->sopt_p);
+ (struct ifnet *)ifn, sopt->sopt_td);
/* use any of our addresses */
satoipx_addr(ifr_ipxip.ifr_addr).x_host =
ipx_ifaddr->ia_addr.sipx_addr.x_host;
return (ipx_control(so, (int)SIOCSIFADDR, (caddr_t)&ifr_ipxip,
- (struct ifnet *)ifn, sopt->sopt_p));
+ (struct ifnet *)ifn, sopt->sopt_td));
}
static int
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c
index 0ae2462..fc0c6dd 100644
--- a/sys/netipx/ipx_pcb.c
+++ b/sys/netipx/ipx_pcb.c
@@ -53,10 +53,10 @@
static struct ipx_addr zeroipx_addr;
int
-ipx_pcballoc(so, head, p)
+ipx_pcballoc(so, head, td)
struct socket *so;
struct ipxpcb *head;
- struct proc *p;
+ struct thread *td;
{
register struct ipxpcb *ipxp;
@@ -72,10 +72,10 @@ ipx_pcballoc(so, head, p)
}
int
-ipx_pcbbind(ipxp, nam, p)
+ipx_pcbbind(ipxp, nam, td)
register struct ipxpcb *ipxp;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
register struct sockaddr_ipx *sipx;
u_short lport = 0;
@@ -99,7 +99,7 @@ ipx_pcbbind(ipxp, nam, p)
int error;
if (aport < IPXPORT_RESERVED &&
- p != NULL && (error = suser(p)) != 0)
+ td != NULL && (error = suser_td(td)) != 0)
return (error);
if (ipx_pcblookup(&zeroipx_addr, lport, 0))
return (EADDRINUSE);
@@ -125,10 +125,10 @@ noname:
* then pick one.
*/
int
-ipx_pcbconnect(ipxp, nam, p)
+ipx_pcbconnect(ipxp, nam, td)
struct ipxpcb *ipxp;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
struct ipx_ifaddr *ia;
register struct sockaddr_ipx *sipx = (struct sockaddr_ipx *)nam;
@@ -242,7 +242,7 @@ ipx_pcbconnect(ipxp, nam, p)
if (ipx_pcblookup(&sipx->sipx_addr, ipxp->ipxp_lport, 0))
return (EADDRINUSE);
if (ipxp->ipxp_lport == 0)
- ipx_pcbbind(ipxp, (struct sockaddr *)NULL, p);
+ ipx_pcbbind(ipxp, (struct sockaddr *)NULL, td);
/* XXX just leave it zero if we can't find a route */
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h
index 13bd9f9..482f812 100644
--- a/sys/netipx/ipx_pcb.h
+++ b/sys/netipx/ipx_pcb.h
@@ -83,11 +83,11 @@ struct ipxpcb {
extern struct ipxpcb ipxpcb; /* head of list */
int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head,
- struct proc *p));
+ struct thread *p));
int ipx_pcbbind __P((struct ipxpcb *ipxp, struct sockaddr *nam,
- struct proc *p));
+ struct thread *p));
int ipx_pcbconnect __P((struct ipxpcb *ipxp, struct sockaddr *nam,
- struct proc *p));
+ struct thread *p));
void ipx_pcbdetach __P((struct ipxpcb *ipxp));
void ipx_pcbdisconnect __P((struct ipxpcb *ipxp));
struct ipxpcb *
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index 4939568..fdd6917 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -70,17 +70,17 @@ SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxrecvspace, CTLFLAG_RW,
&ipxrecvspace, 0, "");
static int ipx_usr_abort(struct socket *so);
-static int ipx_attach(struct socket *so, int proto, struct proc *p);
-static int ipx_bind(struct socket *so, struct sockaddr *nam, struct proc *p);
+static int ipx_attach(struct socket *so, int proto, struct thread *td);
+static int ipx_bind(struct socket *so, struct sockaddr *nam, struct thread *td);
static int ipx_connect(struct socket *so, struct sockaddr *nam,
- struct proc *p);
+ struct thread *td);
static int ipx_detach(struct socket *so);
static int ipx_disconnect(struct socket *so);
static int ipx_send(struct socket *so, int flags, struct mbuf *m,
struct sockaddr *addr, struct mbuf *control,
- struct proc *p);
+ struct thread *td);
static int ipx_shutdown(struct socket *so);
-static int ripx_attach(struct socket *so, int proto, struct proc *p);
+static int ripx_attach(struct socket *so, int proto, struct thread *td);
static int ipx_output(struct ipxpcb *ipxp, struct mbuf *m0);
struct pr_usrreqs ipx_usrreqs = {
@@ -432,10 +432,10 @@ ipx_usr_abort(so)
}
static int
-ipx_attach(so, proto, p)
+ipx_attach(so, proto, td)
struct socket *so;
int proto;
- struct proc *p;
+ struct thread *td;
{
int error;
int s;
@@ -444,7 +444,7 @@ ipx_attach(so, proto, p)
if (ipxp != NULL)
return (EINVAL);
s = splnet();
- error = ipx_pcballoc(so, &ipxpcb, p);
+ error = ipx_pcballoc(so, &ipxpcb, td);
splx(s);
if (error == 0)
error = soreserve(so, ipxsendspace, ipxrecvspace);
@@ -452,21 +452,21 @@ ipx_attach(so, proto, p)
}
static int
-ipx_bind(so, nam, p)
+ipx_bind(so, nam, td)
struct socket *so;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
struct ipxpcb *ipxp = sotoipxpcb(so);
- return (ipx_pcbbind(ipxp, nam, p));
+ return (ipx_pcbbind(ipxp, nam, td));
}
static int
-ipx_connect(so, nam, p)
+ipx_connect(so, nam, td)
struct socket *so;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
int error;
int s;
@@ -475,7 +475,7 @@ ipx_connect(so, nam, p)
if (!ipx_nullhost(ipxp->ipxp_faddr))
return (EISCONN);
s = splnet();
- error = ipx_pcbconnect(ipxp, nam, p);
+ error = ipx_pcbconnect(ipxp, nam, td);
splx(s);
if (error == 0)
soisconnected(so);
@@ -525,13 +525,13 @@ ipx_peeraddr(so, nam)
}
static int
-ipx_send(so, flags, m, nam, control, p)
+ipx_send(so, flags, m, nam, control, td)
struct socket *so;
int flags;
struct mbuf *m;
struct sockaddr *nam;
struct mbuf *control;
- struct proc *p;
+ struct thread *td;
{
int error;
struct ipxpcb *ipxp = sotoipxpcb(so);
@@ -548,7 +548,7 @@ ipx_send(so, flags, m, nam, control, p)
* Must block input while temporarily connected.
*/
s = splnet();
- error = ipx_pcbconnect(ipxp, nam, p);
+ error = ipx_pcbconnect(ipxp, nam, td);
if (error) {
splx(s);
goto send_release;
@@ -593,19 +593,19 @@ ipx_sockaddr(so, nam)
}
static int
-ripx_attach(so, proto, p)
+ripx_attach(so, proto, td)
struct socket *so;
int proto;
- struct proc *p;
+ struct thread *td;
{
int error = 0;
int s;
struct ipxpcb *ipxp = sotoipxpcb(so);
- if (p != NULL && (error = suser(p)) != 0)
+ if (td != NULL && (error = suser_td(td)) != 0)
return (error);
s = splnet();
- error = ipx_pcballoc(so, &ipxrawpcb, p);
+ error = ipx_pcballoc(so, &ipxrawpcb, td);
splx(s);
if (error)
return (error);
diff --git a/sys/netipx/ipx_var.h b/sys/netipx/ipx_var.h
index c387738..7e7b5ef 100644
--- a/sys/netipx/ipx_var.h
+++ b/sys/netipx/ipx_var.h
@@ -80,7 +80,7 @@ extern union ipx_host ipx_broadhost;
struct ifnet;
struct ipx_addr;
struct mbuf;
-struct proc;
+struct thread;
struct route;
struct sockaddr;
struct socket;
@@ -89,7 +89,7 @@ struct sockopt;
void ipx_abort __P((struct ipxpcb *ipxp));
u_short ipx_cksum __P((struct mbuf *m, int len));
int ipx_control __P((struct socket *so, u_long cmd, caddr_t data,
- struct ifnet *ifp, struct proc *p));
+ struct ifnet *ifp, struct thread *td));
void ipx_ctlinput __P((int cmd, struct sockaddr *arg_as_sa, void *dummy));
int ipx_ctloutput __P((struct socket *so, struct sockopt *sopt));
void ipx_drop __P((struct ipxpcb *ipxp, int errno));
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 19ebab9..7f1a1ae 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -89,20 +89,20 @@ static struct spxpcb *spx_usrclosed(struct spxpcb *cb);
static int spx_usr_abort(struct socket *so);
static int spx_accept(struct socket *so, struct sockaddr **nam);
-static int spx_attach(struct socket *so, int proto, struct proc *p);
-static int spx_bind(struct socket *so, struct sockaddr *nam, struct proc *p);
+static int spx_attach(struct socket *so, int proto, struct thread *td);
+static int spx_bind(struct socket *so, struct sockaddr *nam, struct thread *td);
static int spx_connect(struct socket *so, struct sockaddr *nam,
- struct proc *p);
+ struct thread *td);
static int spx_detach(struct socket *so);
static int spx_usr_disconnect(struct socket *so);
-static int spx_listen(struct socket *so, struct proc *p);
+static int spx_listen(struct socket *so, struct thread *td);
static int spx_rcvd(struct socket *so, int flags);
static int spx_rcvoob(struct socket *so, struct mbuf *m, int flags);
static int spx_send(struct socket *so, int flags, struct mbuf *m,
struct sockaddr *addr, struct mbuf *control,
- struct proc *p);
+ struct thread *td);
static int spx_shutdown(struct socket *so);
-static int spx_sp_attach(struct socket *so, int proto, struct proc *p);
+static int spx_sp_attach(struct socket *so, int proto, struct thread *td);
struct pr_usrreqs spx_usrreqs = {
spx_usr_abort, spx_accept, spx_attach, spx_bind,
@@ -223,7 +223,7 @@ spx_input(m, ipxp)
laddr = ipxp->ipxp_laddr;
if (ipx_nullhost(laddr))
ipxp->ipxp_laddr = si->si_dna;
- if (ipx_pcbconnect(ipxp, (struct sockaddr *)sipx, &proc0)) {
+ if (ipx_pcbconnect(ipxp, (struct sockaddr *)sipx, thread0)) {
ipxp->ipxp_laddr = laddr;
spx_istat.noconn++;
goto drop;
@@ -1304,10 +1304,10 @@ spx_accept(so, nam)
}
static int
-spx_attach(so, proto, p)
+spx_attach(so, proto, td)
struct socket *so;
int proto;
- struct proc *p;
+ struct thread *td;
{
int error;
int s;
@@ -1322,7 +1322,7 @@ spx_attach(so, proto, p)
if (ipxp != NULL)
return (EISCONN);
s = splnet();
- error = ipx_pcballoc(so, &ipxpcb, p);
+ error = ipx_pcballoc(so, &ipxpcb, td);
if (error)
goto spx_attach_end;
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
@@ -1370,16 +1370,16 @@ spx_attach_end:
}
static int
-spx_bind(so, nam, p)
+spx_bind(so, nam, td)
struct socket *so;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
struct ipxpcb *ipxp;
ipxp = sotoipxpcb(so);
- return (ipx_pcbbind(ipxp, nam, p));
+ return (ipx_pcbbind(ipxp, nam, td));
}
/*
@@ -1389,10 +1389,10 @@ spx_bind(so, nam, p)
* Send initial system packet requesting connection.
*/
static int
-spx_connect(so, nam, p)
+spx_connect(so, nam, td)
struct socket *so;
struct sockaddr *nam;
- struct proc *p;
+ struct thread *td;
{
int error;
int s;
@@ -1404,11 +1404,11 @@ spx_connect(so, nam, p)
s = splnet();
if (ipxp->ipxp_lport == 0) {
- error = ipx_pcbbind(ipxp, (struct sockaddr *)NULL, p);
+ error = ipx_pcbbind(ipxp, (struct sockaddr *)NULL, td);
if (error)
goto spx_connect_end;
}
- error = ipx_pcbconnect(ipxp, nam, p);
+ error = ipx_pcbconnect(ipxp, nam, td);
if (error)
goto spx_connect_end;
soisconnecting(so);
@@ -1478,9 +1478,9 @@ spx_usr_disconnect(so)
}
static int
-spx_listen(so, p)
+spx_listen(so, td)
struct socket *so;
- struct proc *p;
+ struct thread *td;
{
int error;
struct ipxpcb *ipxp;
@@ -1491,7 +1491,7 @@ spx_listen(so, p)
cb = ipxtospxpcb(ipxp);
if (ipxp->ipxp_lport == 0)
- error = ipx_pcbbind(ipxp, (struct sockaddr *)NULL, p);
+ error = ipx_pcbbind(ipxp, (struct sockaddr *)NULL, td);
if (error == 0)
cb->s_state = TCPS_LISTEN;
return (error);
@@ -1543,13 +1543,13 @@ spx_rcvoob(so, m, flags)
}
static int
-spx_send(so, flags, m, addr, controlp, p)
+spx_send(so, flags, m, addr, controlp, td)
struct socket *so;
int flags;
struct mbuf *m;
struct sockaddr *addr;
struct mbuf *controlp;
- struct proc *p;
+ struct thread *td;
{
int error;
int s;
@@ -1612,15 +1612,15 @@ spx_shutdown(so)
}
static int
-spx_sp_attach(so, proto, p)
+spx_sp_attach(so, proto, td)
struct socket *so;
int proto;
- struct proc *p;
+ struct thread *td;
{
int error;
struct ipxpcb *ipxp;
- error = spx_attach(so, proto, p);
+ error = spx_attach(so, proto, td);
if (error == 0) {
ipxp = sotoipxpcb(so);
((struct spxpcb *)ipxp->ipxp_pcb)->s_flags |=
OpenPOWER on IntegriCloud