9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Martin Neubauer <m.ne@gmx.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Page problems
Date: Sat, 29 Sep 2007 18:17:11 +0200	[thread overview]
Message-ID: <20070929161711.GD801@shodan.homeunix.net> (raw)
In-Reply-To: <53f12eb5933a22903e38de7a0c9f6a19@quanstro.net>

* erik quanstrom (quanstro@quanstro.net) wrote:
> if this is a timing issue, then that should be addressed.  if your diagnosis is
> correct, then if pagecache would slept until the event loop were running,
> that would fix the timing problem.
>
> maybe something like
>
> int	eventdawn;		/* set after event loop is fired up */
>
> Image*
> cachedpage(Document *doc, int angle, int page)
> {
> 	static int lastpage = -1;
> 	static int rabusy;
> 	Image *im;
> 	int ra;
>
> +	while(eventdawn == 0)
> +		sleep(1);

I'm afraid in this instance this wouldn't help. The control flow is smething
like main -> viewer -> { showpage -> cachedpage ; event loop }. Maybe
the following would better:

void
viewer(Document *dd)
{
	.
	.
	.

	midmenu.item = miditems;
	midmenu.gen = 0;
	midmenu.lasthit = Next;

<	showpage(page, &menu);
---
>	if(doc->npage > 0)
>		showpage(page, &menu);
	esetcursor(nil);

	Martin



      reply	other threads:[~2007-09-29 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29 13:37 Gregory Pavelcak
2007-09-29 13:49 ` erik quanstrom
2007-09-29 14:21   ` Martin Neubauer
2007-09-29 14:35     ` Martin Neubauer
2007-09-29 14:37     ` erik quanstrom
2007-09-29 15:28       ` Martin Neubauer
2007-09-29 15:41         ` erik quanstrom
2007-09-29 16:17           ` Martin Neubauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070929161711.GD801@shodan.homeunix.net \
    --to=m.ne@gmx.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).