Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb tsleep -> kpause



details:   https://anonhg.NetBSD.org/src/rev/2fe16aadf167
branches:  trunk
changeset: 996737:2fe16aadf167
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Feb 07 12:37:40 2019 +0000

description:
tsleep -> kpause

diffstat:

 sys/dev/usb/ulpt.c   |   6 +++---
 sys/dev/usb/uthum.c  |   6 +++---
 sys/dev/usb/uvscom.c |   6 +++---
 sys/dev/usb/uyurex.c |  10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)

diffs (124 lines):

diff -r 90fc1b76d49b -r 2fe16aadf167 sys/dev/usb/ulpt.c
--- a/sys/dev/usb/ulpt.c        Thu Feb 07 12:35:43 2019 +0000
+++ b/sys/dev/usb/ulpt.c        Thu Feb 07 12:37:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ulpt.c,v 1.101 2019/01/22 06:38:28 skrll Exp $ */
+/*     $NetBSD: ulpt.c,v 1.102 2019/02/07 12:37:40 skrll Exp $ */
 
 /*
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.101 2019/01/22 06:38:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.102 2019/02/07 12:37:40 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -465,7 +465,7 @@
                }
 
                /* wait 1/4 second, give up if we get a signal */
-               error = tsleep((void *)sc, LPTPRI | PCATCH, "ulptop", STEP);
+               error = kpause("ulptop", true, STEP, NULL);
                if (error != EWOULDBLOCK) {
                        sc->sc_state = 0;
                        goto done;
diff -r 90fc1b76d49b -r 2fe16aadf167 sys/dev/usb/uthum.c
--- a/sys/dev/usb/uthum.c       Thu Feb 07 12:35:43 2019 +0000
+++ b/sys/dev/usb/uthum.c       Thu Feb 07 12:37:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uthum.c,v 1.14 2017/12/10 17:03:07 bouyer Exp $   */
+/*     $NetBSD: uthum.c,v 1.15 2019/02/07 12:39:31 skrll Exp $   */
 /*     $OpenBSD: uthum.c,v 1.6 2010/01/03 18:43:02 deraadt Exp $   */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.14 2017/12/10 17:03:07 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.15 2019/02/07 12:39:31 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -294,7 +294,7 @@
 
        /* wait if required */
        if (need_delay > 1)
-               tsleep(&sc->sc_sme, 0, "uthum", (need_delay*hz+999)/1000 + 1);
+               kpause("uthum", false, (need_delay*hz+999)/1000 + 1, NULL);
 
        /* get answer */
        if (uhidev_get_report(&sc->sc_hdev, UHID_FEATURE_REPORT,
diff -r 90fc1b76d49b -r 2fe16aadf167 sys/dev/usb/uvscom.c
--- a/sys/dev/usb/uvscom.c      Thu Feb 07 12:35:43 2019 +0000
+++ b/sys/dev/usb/uvscom.c      Thu Feb 07 12:37:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvscom.c,v 1.31 2016/11/25 12:56:29 skrll Exp $        */
+/*     $NetBSD: uvscom.c,v 1.32 2019/02/07 12:41:03 skrll Exp $        */
 /*-
  * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama%jp.FreeBSD.org@localhost>.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.31 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.32 2019/02/07 12:41:03 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -759,7 +759,7 @@
                /* unit is not ready */
 
                for (i = UVSCOM_UNIT_WAIT; i > 0; --i) {
-                       tsleep(&err, TTIPRI, "uvsop", hz);      /* XXX */
+                       kpause("uvsopen", false, hz, NULL);
                        if (ISSET(sc->sc_usr, UVSCOM_USTAT_MASK))
                                break;
                }
diff -r 90fc1b76d49b -r 2fe16aadf167 sys/dev/usb/uyurex.c
--- a/sys/dev/usb/uyurex.c      Thu Feb 07 12:35:43 2019 +0000
+++ b/sys/dev/usb/uyurex.c      Thu Feb 07 12:37:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uyurex.c,v 1.14 2019/01/22 06:47:20 skrll Exp $ */
+/*     $NetBSD: uyurex.c,v 1.15 2019/02/07 12:41:21 skrll Exp $ */
 /*     $OpenBSD: uyurex.c,v 1.3 2010/03/04 03:47:22 deraadt Exp $ */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.14 2019/01/22 06:47:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uyurex.c,v 1.15 2019/02/07 12:41:21 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -341,7 +341,7 @@
        }
 
        /* wait ack */
-       tsleep(&sc->sc_sme, 0, "uyurex", (1000*hz+999)/1000 + 1);
+       kpause("uyurexsm", false, (1000*hz+999)/1000 + 1, NULL);
 }
 
 void
@@ -359,7 +359,7 @@
                return;
 
        /* wait till sensor data are updated, 500ms will be enough */
-       tsleep(&sc->sc_sme, 0, "uyurex", (500*hz+999)/1000 + 1);
+       kpause("uyurexrd", false, (500*hz+999)/1000 + 1, NULL);
 }
 
 void
@@ -382,5 +382,5 @@
                return;
 
        /* wait till sensor data are updated, 250ms will be enough */
-       tsleep(&sc->sc_sme, 0, "uyurex", (250*hz+999)/1000 + 1);
+       kpause("uyurexwr", false, (250*hz+999)/1000 + 1, NULL);
 }



Home | Main Index | Thread Index | Old Index