Source-Changes-HG archive

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

[src/trunk]: src/sys sleep() -> tsleep()



details:   https://anonhg.NetBSD.org/src/rev/443ff0f2b80d
branches:  trunk
changeset: 486648:443ff0f2b80d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 27 04:52:27 2000 +0000

description:
sleep() -> tsleep()

diffstat:

 sys/arch/hp300/dev/ppi.c              |   4 ++--
 sys/arch/hp300/dev/rd.c               |   6 +++---
 sys/arch/hp300/dev/sd.c               |   6 +++---
 sys/arch/hp300/dev/st.c               |   4 ++--
 sys/arch/newsmips/dev/fb_start.c      |   7 ++++---
 sys/arch/newsmips/dev/kb_ctrl.c       |   4 ++--
 sys/arch/pmax/dev/rz.c                |   6 +++---
 sys/arch/pmax/dev/tz.c                |   4 ++--
 sys/arch/sun3/dev/xd.c                |   6 +++---
 sys/arch/sun3/dev/xy.c                |   6 +++---
 sys/arch/vax/uba/qd.c                 |   4 ++--
 sys/arch/vax/uba/ts.c                 |   4 ++--
 sys/arch/vax/uba/uba.c                |   6 +++---
 sys/arch/vax/vax/cfl.c                |   6 +++---
 sys/arch/vax/vax/crl.c                |   6 +++---
 sys/arch/vax/vax/crx.c                |   6 +++---
 sys/compat/netbsd32/netbsd32_netbsd.c |   4 ++--
 sys/dev/mscp/mscp.c                   |   6 +++---
 sys/dev/mscp/mscp_disk.c              |   5 +++--
 sys/dev/qbus/qd.c                     |   5 +++--
 sys/dev/vme/xd.c                      |   6 +++---
 sys/dev/vme/xy.c                      |   6 +++---
 sys/kern/kern_sysctl.c                |   4 ++--
 sys/kern/sysv_sem.c                   |   8 +++++---
 sys/miscfs/deadfs/dead_vnops.c        |   4 ++--
 sys/miscfs/fdesc/fdesc_vnops.c        |   4 ++--
 sys/miscfs/union/union_subr.c         |   7 ++++---
 sys/nfs/nfs_socket.c                  |   5 +++--
 sys/ufs/ffs/ffs_vnops.c               |   5 +++--
 sys/ufs/ufs/ufs_quota.c               |  16 ++++++++--------
 30 files changed, 89 insertions(+), 81 deletions(-)

diffs (truncated from 737 to 300 lines):

diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/hp300/dev/ppi.c
--- a/sys/arch/hp300/dev/ppi.c  Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/hp300/dev/ppi.c  Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ppi.c,v 1.18 2000/03/23 06:37:24 thorpej Exp $ */
+/*     $NetBSD: ppi.c,v 1.19 2000/05/27 04:52:27 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -346,7 +346,7 @@
                s = splbio();
                if ((sc->sc_flags & PPIF_UIO) &&
                    hpibreq(sc->sc_dev.dv_parent, &sc->sc_hq) == 0)
-                       sleep(sc, PRIBIO+1);
+                       (void) tsleep(sc, PRIBIO + 1, "ppirw", 0);
                /*
                 * Check if we timed out during sleep or uiomove
                 */
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c   Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/hp300/dev/rd.c   Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rd.c,v 1.42 2000/05/19 18:54:31 thorpej Exp $  */
+/*     $NetBSD: rd.c,v 1.43 2000/05/27 04:52:28 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -572,7 +572,7 @@
         * Wait for any pending opens/closes to complete
         */
        while (rs->sc_flags & (RDF_OPENING|RDF_CLOSING))
-               sleep((caddr_t)rs, PRIBIO);
+               (void) tsleep(rs, PRIBIO, "rdopen", 0);
 
        /*
         * On first open, get label and partition info.
@@ -641,7 +641,7 @@
                s = splbio();
                while (rs->sc_active) {
                        rs->sc_flags |= RDF_WANTED;
-                       sleep((caddr_t)&rs->sc_tab, PRIBIO);
+                       (void) tsleep(&rs->sc_tab, PRIBIO, "rdclose", 0);
                }
                splx(s);
                rs->sc_flags &= ~(RDF_CLOSING|RDF_WLABEL);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/hp300/dev/sd.c
--- a/sys/arch/hp300/dev/sd.c   Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/hp300/dev/sd.c   Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.41 2000/05/19 18:54:32 thorpej Exp $  */
+/*     $NetBSD: sd.c,v 1.42 2000/05/27 04:52:28 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -522,7 +522,7 @@
         * Wait for any pending opens/closes to complete
         */
        while (sc->sc_flags & (SDF_OPENING|SDF_CLOSING))
-               sleep((caddr_t)sc, PRIBIO);
+               (void) tsleep(sc, PRIBIO, "sdopen", 0);
 
        /*
         * On first open, get label and partition info.
@@ -591,7 +591,7 @@
                s = splbio();
                while (sc->sc_active) {
                        sc->sc_flags |= SDF_WANTED;
-                       sleep((caddr_t)&sc->sc_tab, PRIBIO);
+                       (void) tsleep(&sc->sc_tab, PRIBIO, "sdclose", 0);
                }
                splx(s);
                sc->sc_flags &= ~(SDF_CLOSING|SDF_WLABEL|SDF_ERROR);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/hp300/dev/st.c
--- a/sys/arch/hp300/dev/st.c   Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/hp300/dev/st.c   Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st.c,v 1.27 2000/05/19 18:54:32 thorpej Exp $  */
+/*     $NetBSD: st.c,v 1.28 2000/05/27 04:52:28 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -1204,7 +1204,7 @@
                if (bp->b_flags & B_DONE)
                        break;
                bp->b_flags |= B_WANTED;
-               sleep((caddr_t)bp, PRIBIO);
+               (void) tsleep(bp, PRIBIO, "stcmd", 0);
        }
        bp->b_flags = B_BUSY|B_READ;
        splx(s);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/newsmips/dev/fb_start.c
--- a/sys/arch/newsmips/dev/fb_start.c  Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/newsmips/dev/fb_start.c  Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fb_start.c,v 1.4 1999/12/04 21:20:57 ragge Exp $       */
+/*     $NetBSD: fb_start.c,v 1.5 2000/05/27 04:52:30 thorpej Exp $     */
 /*
  * Copyright (c) 1992, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -212,7 +212,7 @@
        s = splbitmap();
        while (bitmap_use & FB_BUSY) {
                bitmap_use |= FB_WANTED;
-               sleep((caddr_t)&bitmap_use, FBPRI);
+               (void) tsleep(&bitmap_use, FBPRI, "fbbitmap", 0);
        }
        bitmap_use |= FB_BUSY;
        splx(s);
@@ -294,7 +294,8 @@
                                fbbm_ioctl(fb, FB_INTCLEAR, &i);
                        } else {
                                fb->run_flag |= FB_WAITING;
-                               sleep((caddr_t)&fb->run_flag, FBPRI);
+                               (void) tsleep(&fb->run_flag, FBPRI,
+                                   "fbrop", 0);
                        }
                }
                splx(s);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/newsmips/dev/kb_ctrl.c
--- a/sys/arch/newsmips/dev/kb_ctrl.c   Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/newsmips/dev/kb_ctrl.c   Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kb_ctrl.c,v 1.3 1998/12/26 00:53:49 tsubai Exp $       */
+/*     $NetBSD: kb_ctrl.c,v 1.4 2000/05/27 04:52:30 thorpej Exp $      */
 
 /*
  * Copyright (c) 1992, 1993
@@ -196,7 +196,7 @@
        s = splscc();
        while ((n = imin(scode_buf.c_cc, count)) == 0) {
                kb_rwait = 1;
-               sleep((caddr_t)&kb_rwait, KBPRI);
+               (void) tsleep(&kb_rwait, KBPRI, "kbdrdraw", 0);
                kb_rwait = 0;
        }
        (void) splx(s);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/pmax/dev/rz.c
--- a/sys/arch/pmax/dev/rz.c    Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/pmax/dev/rz.c    Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rz.c,v 1.60 2000/05/19 18:54:26 thorpej Exp $  */
+/*     $NetBSD: rz.c,v 1.61 2000/05/27 04:52:30 thorpej Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: rz.c,v 1.60 2000/05/19 18:54:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rz.c,v 1.61 2000/05/27 04:52:30 thorpej Exp $");
 
 /*
  * SCSI CCS (Command Command Set) disk driver.
@@ -1072,7 +1072,7 @@
        if (sc->sc_openpart == 0) {
                s = splbio();
                while (BUFQ_FIRST(&sc->sc_tab) != NULL)
-                       sleep((caddr_t)&sc->sc_tab, PZERO - 1);
+                       (void) tsleep(&sc->sc_tab, PZERO - 1, "rzclose", 0);
                splx(s);
 #if 0
                /* 4.4Lite semantics  breaks disklabel -[N|W] on close */
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/pmax/dev/tz.c
--- a/sys/arch/pmax/dev/tz.c    Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/pmax/dev/tz.c    Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tz.c,v 1.29 2000/05/19 18:54:27 thorpej Exp $  */
+/*     $NetBSD: tz.c,v 1.30 2000/05/27 04:52:31 thorpej Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -335,7 +335,7 @@
        /* wait for pending operations to finish */
        while (BUFQ_FIRST(&sc->sc_tab) != NULL) {
                sc->sc_flags |= TZF_WAIT;
-               sleep(&sc->sc_flags, PZERO);
+               (void) tsleep(&sc->sc_flags, PZERO, "tzcmd", 0);
        }
        sc->sc_flags |= TZF_DONTCOUNT;  /* don't count any operations in blkno */
        sc->sc_flags |= TZF_ALTCMD;     /* force use of sc_cdb */
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/sun3/dev/xd.c
--- a/sys/arch/sun3/dev/xd.c    Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/sun3/dev/xd.c    Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xd.c,v 1.28 2000/05/19 18:54:28 thorpej Exp $  */
+/*     $NetBSD: xd.c,v 1.29 2000/05/27 04:52:31 thorpej Exp $  */
 
 /*
  *
@@ -1499,7 +1499,7 @@
                        return XD_ERR_AOK;      /* success */
                case XD_SUB_WAIT:
                        while (iorq->iopb->done == 0) {
-                               sleep(iorq, PRIBIO);
+                               (void) tsleep(iorq, PRIBIO, "xdciorq", 0);
                        }
                        return (iorq->errno);
                case XD_SUB_POLL:
@@ -1531,7 +1531,7 @@
                return (XD_ERR_AOK);    /* success */
        case XD_SUB_WAIT:
                while (iorq->iopb->done == 0) {
-                       sleep(iorq, PRIBIO);
+                       (void) tsleep(iorq, PRIBIO, "xdciorq", 0);
                }
                return (iorq->errno);
        case XD_SUB_POLL:
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/sun3/dev/xy.c
--- a/sys/arch/sun3/dev/xy.c    Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/sun3/dev/xy.c    Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xy.c,v 1.29 2000/05/19 18:54:28 thorpej Exp $  */
+/*     $NetBSD: xy.c,v 1.30 2000/05/27 04:52:31 thorpej Exp $  */
 
 /*
  *
@@ -1373,7 +1373,7 @@
                        return XY_ERR_AOK;      /* success */
                case XY_SUB_WAIT:
                        while (iorq->iopb->done == 0) {
-                               sleep(iorq, PRIBIO);
+                               (void) tsleep(iorq, PRIBIO, "xyciorq", 0);
                        }
                        return (iorq->errno);
                case XY_SUB_POLL:               /* steal controller */
@@ -1405,7 +1405,7 @@
                return (XY_ERR_AOK);    /* success */
        case XY_SUB_WAIT:
                while (iorq->iopb->done == 0) {
-                       sleep(iorq, PRIBIO);
+                       (void) tsleep(iorq, PRIBIO, "xyciorq", 0);
                }
                return (iorq->errno);
        case XY_SUB_POLL:
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/vax/uba/qd.c
--- a/sys/arch/vax/uba/qd.c     Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/vax/uba/qd.c     Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qd.c,v 1.14 2000/01/18 19:50:32 thorpej Exp $  */
+/*     $NetBSD: qd.c,v 1.15 2000/05/27 04:52:32 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1988 Regents of the University of California.
@@ -1661,7 +1661,7 @@
        dga->bytcnt_hi = (short) (bp->b_bcount >> 16);
        
        while (qdflags[unit].user_dma) {
-               sleep((caddr_t)&qdflags[unit].user_dma, QDPRIOR);
+               (void) tsleep(&qdflags[unit].user_dma, QDPRIOR, "qdstrat", 0);
        }
        splx(s);
        ubarelse(uh, &QBAreg);
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/vax/uba/ts.c
--- a/sys/arch/vax/uba/ts.c     Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/vax/uba/ts.c     Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ts.c,v 1.15 2000/01/18 19:51:03 thorpej Exp $ */
+/*     $NetBSD: ts.c,v 1.16 2000/05/27 04:52:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -379,7 +379,7 @@
                if (bp->b_bcount == 0 && (bp->b_flags & B_DONE))
                        break;
                bp->b_flags |= B_WANTED;
-               sleep ((caddr_t)bp, PRIBIO);
+               (void) tsleep(bp, PRIBIO, "tscmd", 0);
                /* check MOT-flag !!! */
        }
        bp->b_flags = B_BUSY | B_READ;
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/vax/uba/uba.c
--- a/sys/arch/vax/uba/uba.c    Sat May 27 04:46:24 2000 +0000
+++ b/sys/arch/vax/uba/uba.c    Sat May 27 04:52:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uba.c,v 1.44 2000/05/19 18:54:29 thorpej Exp $    */
+/*     $NetBSD: uba.c,v 1.45 2000/05/27 04:52:33 thorpej Exp $    */
 /*
  * Copyright (c) 1996 Jonathan Stone.
  * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@@ -593,7 +593,7 @@
                        return (0);
                }
                uh->uh_mrwant++;
-               sleep((caddr_t)&uh->uh_mrwant, PSWP);
+               (void) tsleep(&uh->uh_mrwant, PSWP, "ubamrwant", 0);
        }
        if ((flags & UBA_NEED16) && reg + npf > 128) {
                /*
@@ -613,7 +613,7 @@
                                return (0);
                        }
                        uh->uh_bdpwant++;
-                       sleep((caddr_t)&uh->uh_bdpwant, PSWP);
+                       (void) tsleep(&uh->uh_bdpwant, PSWP, "ubabdpwant", 0);
                }
                uh->uh_bdpfree &= ~(1 << (bdp-1));
        } else if (flags & UBA_HAVEBDP)
diff -r e60dbfcada24 -r 443ff0f2b80d sys/arch/vax/vax/cfl.c
--- a/sys/arch/vax/vax/cfl.c    Sat May 27 04:46:24 2000 +0000



Home | Main Index | Thread Index | Old Index