Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netsmb make compile - P_SELECT changed to lwp-specific L...



details:   https://anonhg.NetBSD.org/src/rev/a0730e8c2203
branches:  trunk
changeset: 543063:a0730e8c2203
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Feb 15 23:26:57 2003 +0000

description:
make compile - P_SELECT changed to lwp-specific L_SELECT; use curlwp
as the lwp, hopefully this is actually correct

diffstat:

 sys/netsmb/smb_trantcp.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (60 lines):

diff -r 2658b10a8d50 -r a0730e8c2203 sys/netsmb/smb_trantcp.c
--- a/sys/netsmb/smb_trantcp.c  Sat Feb 15 23:02:30 2003 +0000
+++ b/sys/netsmb/smb_trantcp.c  Sat Feb 15 23:26:57 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_trantcp.c,v 1.4 2003/01/06 20:30:38 wiz Exp $      */
+/*     $NetBSD: smb_trantcp.c,v 1.5 2003/02/15 23:26:57 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -154,6 +154,7 @@
        struct timeval atv, rtv, ttv;
        int timo, error;
        int s, sl;
+       struct lwp *l = curlwp;
 
        if (tv) {
                atv = *tv;
@@ -172,7 +173,7 @@
 
        PROC_LOCK(p);
        SCHED_LOCK(sl);
-       p->p_flag |= P_SELECT;
+       l->l_flag |= L_SELECT;
        SCHED_UNLOCK(sl);
        PROC_UNLOCK(p);
        error = nb_poll(nbp, events, p);
@@ -188,12 +189,12 @@
                        /*
                         * An event of our interest may occur during locking a process.
                         * In order to avoid missing the event that occured during locking
-                        * the process, test P_SELECT and rescan file descriptors if
+                        * the process, test L_SELECT and rescan file descriptors if
                         * necessary.
                         */
                        SCHED_LOCK(sl);
-                       if ((p->p_flag & P_SELECT) == 0) {
-                               p->p_flag |= P_SELECT;
+                       if ((l->l_flag & L_SELECT) == 0) {
+                               l->l_flag |= L_SELECT;
                                SCHED_UNLOCK(sl);
                                PROC_UNLOCK(p);
                                error = nb_poll(nbp, events, p);
@@ -209,7 +210,7 @@
                timo = hzto(&ttv);
        }
        SCHED_LOCK(sl);
-       p->p_flag &= ~P_SELECT;
+       l->l_flag &= ~L_SELECT;
        SCHED_UNLOCK(sl);
        if (timo > 0)
                error = tsleep((caddr_t)&selwait, PSOCK, "nbssn_rselect", 
@@ -221,7 +222,7 @@
 
 done:
        SCHED_LOCK(sl);
-       p->p_flag &= ~P_SELECT;
+       l->l_flag &= ~L_SELECT;
        SCHED_UNLOCK(sl);
        PROC_UNLOCK(p);
 



Home | Main Index | Thread Index | Old Index