Hi tech@,
Here is a diff to convert all tsleep(9) calls in wsdisplay(4)
to tsleep_nsec(9).
Comments? OK?
Index: sys/dev/wscons/wsdisplay.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsdisplay.c,v
retrieving revision 1.133
diff -u -p -r1.133 wsdisplay.c
--- sys/dev/wscons/wsdisplay.c 1 Jul 2019 19:38:40 -0000 1.133
+++ sys/dev/wscons/wsdisplay.c 8 Oct 2019 14:40:56 -0000
@@ -1830,7 +1830,8 @@ wsdisplay_switch(struct device *dev, int
s = spltty();
while (sc->sc_resumescreen != WSDISPLAY_NULLSCREEN && res == 0)
- res = tsleep(&sc->sc_resumescreen, PCATCH, "wsrestore", 0);
+ res = tsleep_nsec(&sc->sc_resumescreen, PCATCH, "wsrestore",
+ INFSLP);
if (res) {
splx(s);
return (res);
@@ -1980,7 +1981,7 @@ wsscreen_switchwait(struct wsdisplay_sof
if (no == WSDISPLAY_NULLSCREEN) {
s = spltty();
while (sc->sc_focus && res == 0) {
- res = tsleep(sc, PCATCH, "wswait", 0);
+ res = tsleep_nsec(sc, PCATCH, "wswait", INFSLP);
}
splx(s);
return (res);
@@ -1995,7 +1996,7 @@ wsscreen_switchwait(struct wsdisplay_sof
s = spltty();
if (scr != sc->sc_focus) {
scr->scr_flags |= SCR_WAITACTIVE;
- res = tsleep(scr, PCATCH, "wswait2", 0);
+ res = tsleep_nsec(scr, PCATCH, "wswait2", INFSLP);
if (scr != sc->sc_scr[no])
res = ENXIO; /* disappeared in the meantime */
else