The qlock in cache.c was necessary because moving through pages really fast (hold down right/left ...
15 years, 5 months ago
(2009-08-09 19:52:36 UTC)
#2
The qlock in cache.c was necessary because moving through pages really fast
(hold down right/left arrow key) results in this:
% page net.pdf
reading through pdf...
bmp: bad magic number, not a BMP file
warning: couldn't read image: Success
fatal: readimage error Success
% 7673: signal: sys: write on closed pipe
I guess ghostscript is outputting nonsense when we try to draw two pages at
nearly the same time.
thanks very much for doing this. the qlock/qunlock is not enough. All the graphics ops ...
15 years, 5 months ago
(2009-08-09 20:41:11 UTC)
#3
thanks very much for doing this.
the qlock/qunlock is not enough. All the graphics ops
need to be locked between the two procs. The way to
do this is to set display->locking = 1 in main and
then use lockdisplay/unlockdisplay in raproc around
the call to _cachedpage. Similarly, instead of
switch(alt(alts)) {
I think you need
unlockdisplay();
a = alt(alts);
lockdisplay();
switch(a) {
in view.c. that will unlock the display while
waiting for input, so that the readahead proc
can do things instead.
look at the calls to lockdisplay and unlockdisplay
in the plan 9 page for more examples: they were
added explicitly for the cache.
On 2009/08/10 00:16:38, codebot wrote: > # codebot: apply > > applied. Looks like cache.c ...
15 years, 5 months ago
(2009-08-10 02:43:53 UTC)
#7
On 2009/08/10 00:16:38, codebot wrote:
> # codebot: apply
>
> applied.
Looks like cache.c got added to the wrong place: cmd/page/cache.c instead of
src/cmd/page/cache.c. The patch had the correct path.