lkml.org 
[lkml]   [1996]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VC corruption, easy to reproduce with 2.0.0 to 2.0.0pl2
On Sat, 22 Jun 1996, Aaron Tiensivu wrote:
> This happens to me all the time when switching between a normal Linux console
> prompt [like at a bash command line] and DOSEMU running Turbo C++... this also
> happens to me with SVGALib programs.
>
> I have to switch...wait....switch-back..
>
> If I do it too quickly, I have to logon with my terminal and kill the offending
> program.

Make sense. There's nothing much you can do about it. Problem is video
memory can only be used by one program at one time (obvious isn't it:).
When, you switch out of svgalib program, the program will save screen
state, switch, and wait. Every 1 second it checks to see if it has been
switched back (via ioctl(2) and sleep(3)). If it has, it restores the
screen state. The saving and restoring of screen state is *critical*. If
you switch out when it is restoring state, or switch in when it is saving
state... ack!

This is what I understand from the svgalib sources. Feel free to correct
me.

Just for kicks, try running two svga programs at the same time. Try to
time your switching so that restore comes after save not in the middle....
:) :) :)

The problem with svgalib/dosemu/X is that multiple processes are fighting
between one video memory. There has to be some sort locking mechanism for
this or only allow one program to access the video memory. You won't get
this problem in DOS since only one process can be running at one time. :/

Regards,

Hasdi

Lignux, the choice of the Nu generation.



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.036 / U:8.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site