Deleted Added
full compact
32c32
< * $FreeBSD: head/sys/netsmb/smb_trantcp.c 76618 2001-05-15 10:19:57Z tanimura $
---
> * $FreeBSD: head/sys/netsmb/smb_trantcp.c 87192 2001-12-02 08:47:29Z bp $
73,74c73,74
< #define nb_sosend(so,m,flags,p) (so)->so_proto->pr_usrreqs->pru_sosend( \
< so, NULL, 0, m, 0, flags, p)
---
> #define nb_sosend(so,m,flags,td) (so)->so_proto->pr_usrreqs->pru_sosend( \
> so, NULL, 0, m, 0, flags, td)
77,78c77,78
< u_int8_t *rpcodep, struct proc *p);
< static int smb_nbst_disconnect(struct smb_vc *vcp, struct proc *p);
---
> u_int8_t *rpcodep, struct thread *td);
> static int smb_nbst_disconnect(struct smb_vc *vcp, struct thread *td);
94c94
< nb_poll(struct nbpcb *nbp, int events, struct proc *p)
---
> nb_poll(struct nbpcb *nbp, int events, struct thread *td)
97c97
< events, NULL, p);
---
> events, NULL, td);
101c101,102
< nbssn_rselect(struct nbpcb *nbp, struct timeval *tv, int events, struct proc *p)
---
> nbssn_rselect(struct nbpcb *nbp, struct timeval *tv, int events,
> struct thread *td)
103a105
> struct proc *p;
115a118
> p = td->td_proc;
117c120,122
< p->p_flag |= P_SELECT;
---
> mtx_lock_spin(&sched_lock);
> td->td_flags |= TDF_SELECT;
> mtx_unlock_spin(&sched_lock);
119c124
< error = nb_poll(nbp, events, p);
---
> error = nb_poll(nbp, events, td);
134,135c139,142
< if ((p->p_flag & P_SELECT) == 0) {
< p->p_flag |= P_SELECT;
---
> mtx_lock_spin(&sched_lock);
> if ((td->td_flags & TDF_SELECT) == 0) {
> td->td_flags |= TDF_SELECT;
> mtx_unlock_spin(&sched_lock);
137c144
< error = nb_poll(nbp, events, p);
---
> error = nb_poll(nbp, events, td);
139c146,147
< }
---
> } else
> mtx_unlock_spin(&sched_lock);
146c154,156
< p->p_flag &= ~P_SELECT;
---
> mtx_lock_spin(&sched_lock);
> td->td_flags &= ~TDF_SELECT;
> mtx_unlock_spin(&sched_lock);
154a165,167
> mtx_lock_spin(&sched_lock);
> td->td_flags &= ~TDF_SELECT;
> mtx_unlock_spin(&sched_lock);
156c169
< p->p_flag &= ~P_SELECT;
---
>
211c224
< nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, struct proc *p)
---
> nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, struct thread *td)
216c229
< error = socreate(AF_INET, &so, SOCK_STREAM, IPPROTO_TCP, p);
---
> error = socreate(AF_INET, &so, SOCK_STREAM, IPPROTO_TCP, td);
232c245
< error = soconnect(so, (struct sockaddr*)to, p);
---
> error = soconnect(so, (struct sockaddr*)to, td);
239c252
< (error = nb_intr(nbp, p)) != 0) {
---
> (error = nb_intr(nbp, td->td_proc)) != 0) {
254c267
< smb_nbst_disconnect(nbp->nbp_vc, p);
---
> smb_nbst_disconnect(nbp->nbp_vc, td);
259c272
< nbssn_rq_request(struct nbpcb *nbp, struct proc *p)
---
> nbssn_rq_request(struct nbpcb *nbp, struct thread *td)
277c290
< error = nb_sosend(nbp->nbp_tso, mbp->mb_top, 0, p);
---
> error = nb_sosend(nbp->nbp_tso, mbp->mb_top, 0, td);
286c299
< error = nbssn_rselect(nbp, &tv, POLLIN, p);
---
> error = nbssn_rselect(nbp, &tv, POLLIN, td);
293c306
< error = nbssn_recv(nbp, &m0, &rplen, &rpcode, p);
---
> error = nbssn_recv(nbp, &m0, &rplen, &rpcode, td);
322,323c335,336
< smb_nbst_disconnect(nbp->nbp_vc, p);
< error = nb_connect_in(nbp, &sin, p);
---
> smb_nbst_disconnect(nbp->nbp_vc, td);
> error = nb_connect_in(nbp, &sin, td);
325c338
< error = nbssn_rq_request(nbp, p);
---
> error = nbssn_rq_request(nbp, td);
327c340
< smb_nbst_disconnect(nbp->nbp_vc, p);
---
> smb_nbst_disconnect(nbp->nbp_vc, td);
338c351
< u_int8_t *rpcodep, int flags, struct proc *p)
---
> u_int8_t *rpcodep, int flags, struct thread *td)
354c367
< auio.uio_procp = p;
---
> auio.uio_td = td;
377c390
< u_int8_t *rpcodep, struct proc *p)
---
> u_int8_t *rpcodep, struct thread *td)
393c406
< error = nbssn_recvhdr(nbp, &len, &rpcode, MSG_DONTWAIT, p);
---
> error = nbssn_recvhdr(nbp, &len, &rpcode, MSG_DONTWAIT, td);
408c421
< auio.uio_procp = p;
---
> auio.uio_td = td;
448c461
< smb_nbst_create(struct smb_vc *vcp, struct proc *p)
---
> smb_nbst_create(struct smb_vc *vcp, struct thread *td)
464c477
< smb_nbst_done(struct smb_vc *vcp, struct proc *p)
---
> smb_nbst_done(struct smb_vc *vcp, struct thread *td)
470c483
< smb_nbst_disconnect(vcp, p);
---
> smb_nbst_disconnect(vcp, td);
480c493
< smb_nbst_bind(struct smb_vc *vcp, struct sockaddr *sap, struct proc *p)
---
> smb_nbst_bind(struct smb_vc *vcp, struct sockaddr *sap, struct thread *td)
513c526
< smb_nbst_connect(struct smb_vc *vcp, struct sockaddr *sap, struct proc *p)
---
> smb_nbst_connect(struct smb_vc *vcp, struct sockaddr *sap, struct thread *td)
539c552
< error = nb_connect_in(nbp, &sin, p);
---
> error = nb_connect_in(nbp, &sin, td);
550c563
< error = nbssn_rq_request(nbp, p);
---
> error = nbssn_rq_request(nbp, td);
552c565
< smb_nbst_disconnect(vcp, p);
---
> smb_nbst_disconnect(vcp, td);
557c570
< smb_nbst_disconnect(struct smb_vc *vcp, struct proc *p)
---
> smb_nbst_disconnect(struct smb_vc *vcp, struct thread *td)
577c590
< smb_nbst_send(struct smb_vc *vcp, struct mbuf *m0, struct proc *p)
---
> smb_nbst_send(struct smb_vc *vcp, struct mbuf *m0, struct thread *td)
590c603
< error = nb_sosend(nbp->nbp_tso, m0, 0, p);
---
> error = nb_sosend(nbp->nbp_tso, m0, 0, td);
600c613
< smb_nbst_recv(struct smb_vc *vcp, struct mbuf **mpp, struct proc *p)
---
> smb_nbst_recv(struct smb_vc *vcp, struct mbuf **mpp, struct thread *td)
607c620
< error = nbssn_recv(nbp, mpp, &rplen, &rpcode, p);
---
> error = nbssn_recv(nbp, mpp, &rplen, &rpcode, td);