コード例 #1
0
int
puffs__cc_restoremain(struct puffs_usermount *pu)
{

	if (puffs_fakecc)
		return 0;

	puffs__cc_destroy(puffs_cc_getcc(pu), 1);
	PU_SETSFLAG(pu, PU_MAINRESTORE);
	return setcontext(&pu->pu_mainctx);
}
コード例 #2
0
/*
 * Internal continue routine.  This has slightly different semantics.
 * We simply make our cc available in the freelist and jump to the 
 * indicated pcc.
 */
void
puffs__cc_cont(struct puffs_cc *pcc)
{
	struct puffs_cc *mycc;

	mycc = puffs_cc_getcc(pcc->pcc_pu);
	DPRINTF(("puffs__cc_cont: pcc %p, mycc %p\n", pcc, mycc));

	/*
	 * XXX: race between setcontext() and recycle if
	 * we go multithreaded
	 */
	puffs__cc_destroy(mycc, 1);
	pcc->pcc_flags |= PCC_MLCONT;
	setcontext(&pcc->pcc_uc);
}
コード例 #3
0
int
puffs_dispatch_exec(struct puffs_cc *pcc, struct puffs_framebuf **pbp)
{
	int rv;

	puffs_cc_continue(pcc);

	if (pcc->pcc_flags & PCC_DONE) {
		rv = 1;
		*pbp = pcc->pcc_pb;
		pcc->pcc_flags = 0;
		puffs__cc_destroy(pcc, 0);
	} else {
		rv = 0;
	}

	return rv;
}