Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/tc Fix a few race conditions ... the VSYNC update fl...



details:   https://anonhg.NetBSD.org/src/rev/62ee712a98b3
branches:  trunk
changeset: 508816:62ee712a98b3
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Apr 20 11:53:06 2001 +0000

description:
Fix a few race conditions ... the VSYNC update flag could be cleared
resulting in a blank screen when f.e. a setcursor ioctl was called
after the screenblanker had enabled the screen again ... the actual
switching on was then never performed at VSYNC.

A simple |= instead of = does the trick ... just leave the other bits
on please :)

diffstat:

 sys/dev/tc/cfb.c |  8 ++++----
 sys/dev/tc/sfb.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 206c386dfaf5 -r 62ee712a98b3 sys/dev/tc/cfb.c
--- a/sys/dev/tc/cfb.c  Fri Apr 20 11:45:37 2001 +0000
+++ b/sys/dev/tc/cfb.c  Fri Apr 20 11:53:06 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.26 2001/01/16 05:32:16 nisimura Exp $ */
+/* $NetBSD: cfb.c,v 1.27 2001/04/20 11:53:06 reinoud Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.26 2001/01/16 05:32:16 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.27 2001/04/20 11:53:06 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -415,7 +415,7 @@
 
        case WSDISPLAYIO_SCURPOS:
                set_curpos(sc, (struct wsdisplay_curpos *)data);
-               sc->sc_changed = WSDISPLAY_CURSOR_DOPOS;
+               sc->sc_changed |= WSDISPLAY_CURSOR_DOPOS;
                return (0);
 
        case WSDISPLAYIO_GCURMAX:
@@ -761,7 +761,7 @@
                copyin(p->image, cc->cc_image, icount);
                copyin(p->mask, cc->cc_image+CURSOR_MAX_SIZE, icount);
        }
-       sc->sc_changed = v;
+       sc->sc_changed |= v;
 
        return (0);
 #undef cc
diff -r 206c386dfaf5 -r 62ee712a98b3 sys/dev/tc/sfb.c
--- a/sys/dev/tc/sfb.c  Fri Apr 20 11:45:37 2001 +0000
+++ b/sys/dev/tc/sfb.c  Fri Apr 20 11:53:06 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.44 2001/02/19 09:11:11 nisimura Exp $ */
+/* $NetBSD: sfb.c,v 1.45 2001/04/20 11:53:06 reinoud Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.44 2001/02/19 09:11:11 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.45 2001/04/20 11:53:06 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -447,7 +447,7 @@
 
        case WSDISPLAYIO_SCURPOS:
                set_curpos(sc, (struct wsdisplay_curpos *)data);
-               sc->sc_changed = WSDISPLAY_CURSOR_DOPOS;
+               sc->sc_changed |= WSDISPLAY_CURSOR_DOPOS;
                return (0);
 
        case WSDISPLAYIO_GCURMAX:
@@ -797,7 +797,7 @@
                copyin(p->image, cc->cc_image, icount);
                copyin(p->mask, cc->cc_image+CURSOR_MAX_SIZE, icount);
        }
-       sc->sc_changed = v;
+       sc->sc_changed |= v;
 
        return (0);
 #undef cc



Home | Main Index | Thread Index | Old Index