summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sockbuf.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/kern/uipc_sockbuf.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/kern/uipc_sockbuf.c')
-rw-r--r--sys/kern/uipc_sockbuf.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index e352e36..b7042ff 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -221,10 +221,10 @@ sonewconn(head, connstatus)
}
struct socket *
-sonewconn3(head, connstatus, p)
+sonewconn3(head, connstatus, td)
register struct socket *head;
int connstatus;
- struct proc *p;
+ struct thread *td;
{
register struct socket *so;
@@ -240,7 +240,7 @@ sonewconn3(head, connstatus, p)
so->so_state = head->so_state | SS_NOFDREF;
so->so_proto = head->so_proto;
so->so_timeo = head->so_timeo;
- so->so_cred = p ? p->p_ucred : head->so_cred;
+ so->so_cred = td ? td->td_proc->p_ucred : head->so_cred;
crhold(so->so_cred);
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) ||
(*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) {
@@ -391,11 +391,11 @@ soreserve(so, sndcc, rcvcc)
register struct socket *so;
u_long sndcc, rcvcc;
{
- struct proc *p = curproc;
+ struct thread *td = curthread;
- if (sbreserve(&so->so_snd, sndcc, so, p) == 0)
+ if (sbreserve(&so->so_snd, sndcc, so, td) == 0)
goto bad;
- if (sbreserve(&so->so_rcv, rcvcc, so, p) == 0)
+ if (sbreserve(&so->so_rcv, rcvcc, so, td) == 0)
goto bad2;
if (so->so_rcv.sb_lowat == 0)
so->so_rcv.sb_lowat = 1;
@@ -416,21 +416,21 @@ bad:
* if buffering efficiency is near the normal case.
*/
int
-sbreserve(sb, cc, so, p)
+sbreserve(sb, cc, so, td)
struct sockbuf *sb;
u_long cc;
struct socket *so;
- struct proc *p;
+ struct thread *td;
{
/*
- * p will only be NULL when we're in an interrupt
+ * td will only be NULL when we're in an interrupt
* (e.g. in tcp_input())
*/
if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES))
return (0);
if (!chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, cc,
- p ? p->p_rlimit[RLIMIT_SBSIZE].rlim_cur : RLIM_INFINITY)) {
+ td ? td->td_proc->p_rlimit[RLIMIT_SBSIZE].rlim_cur : RLIM_INFINITY)) {
return (0);
}
sb->sb_mbmax = min(cc * sb_efficiency, sb_max);
@@ -876,7 +876,7 @@ pru_accept_notsupp(struct socket *so, struct sockaddr **nam)
}
int
-pru_connect_notsupp(struct socket *so, struct sockaddr *nam, struct proc *p)
+pru_connect_notsupp(struct socket *so, struct sockaddr *nam, struct thread *td)
{
return EOPNOTSUPP;
}
@@ -889,13 +889,13 @@ pru_connect2_notsupp(struct socket *so1, struct socket *so2)
int
pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data,
- struct ifnet *ifp, struct proc *p)
+ struct ifnet *ifp, struct thread *td)
{
return EOPNOTSUPP;
}
int
-pru_listen_notsupp(struct socket *so, struct proc *p)
+pru_listen_notsupp(struct socket *so, struct thread *td)
{
return EOPNOTSUPP;
}
OpenPOWER on IntegriCloud