diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-07-07 21:02:46 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-07-07 21:02:46 +0200 |
commit | bb11bb1c1f18660c29d5bc46e8de049fd03ff2a0 (patch) | |
tree | 67f50998a0491268073575b71a0493ce1401dd92 /sys/src | |
parent | e32940f7269306a108fbe3f2ee742a3a8e74133e (diff) |
vesa: fix blank/unblank wakeups
it could happen that we unblanked while vesaproc was
currently blanking (when manually blanking using vgactl
for example). the wakeup of the unblank is lost.
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/pc/vgavesa.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/src/9/pc/vgavesa.c b/sys/src/9/pc/vgavesa.c index fbe051f5f..b2748b4af 100644 --- a/sys/src/9/pc/vgavesa.c +++ b/sys/src/9/pc/vgavesa.c @@ -163,22 +163,25 @@ vesalinear(VGAscr *scr, int, int) } static int -vesadisabled(void *) +gotctl(void *arg) { - return vesactl == Cdisable; + return vesactl != *((int*)arg); } static void vesaproc(void*) { Ureg u; + int ctl; - while(vesactl != Cdisable){ + ctl = Cenable; + while(ctl != Cdisable){ if(!waserror()){ - sleep(&vesar, vesadisabled, nil); + sleep(&vesar, gotctl, &ctl); + ctl = vesactl; vbesetup(&u, 0x4f10); - if(vesactl == Cblank) + if(ctl == Cblank) u.bx = 0x0101; else u.bx = 0x0001; |