예제 #1
0
파일: screen.c 프로젝트: dancrossnyc/harvey
/*
 * Need to lock drawlock for ourselves.
 */
void
swenable(VGAscr *v)
{
	swenabled = 1;
	if(canqlock(&drawlock)){
		swcursordraw();
		qunlock(&drawlock);
	}
}
예제 #2
0
파일: screen.c 프로젝트: mischief/9problems
void
cursoron(void)
{
	qlock(&drawlock);
	lock(&cursor);
	swcursorhide();
	swcursordraw(mousexy());
	unlock(&cursor);
	qunlock(&drawlock);
}
예제 #3
0
int
cursoron(int dolock)
{
	int retry;

	if (dolock)
		lock(&cursor);
	if (canqlock(&drawlock)) {
		retry = 0;
		swcursorhide();
		swcursordraw();
		qunlock(&drawlock);
	} else
		retry = 1;
	if (dolock)
		unlock(&cursor);
	return retry;
}
예제 #4
0
파일: screen.c 프로젝트: dancrossnyc/harvey
void
swcursorclock(void)
{
	int x;
	if(!swenabled)
		return;
	if(swvisible && eqpt(swpt, swvispt) && swvers==swvisvers)
		return;

	x = splhi();
	if(swenabled)
	if(!swvisible || !eqpt(swpt, swvispt) || swvers!=swvisvers)
	if(canqlock(&drawlock)){
		swcursorhide();
		swcursordraw();
		qunlock(&drawlock);
	}
	splx(x);
}