コード例 #1
0
ファイル: select.c プロジェクト: ArcEye/RTAI
/**
 * Destroy a selector block.
 *
 * All bindings with file descriptor are destroyed.
 *
 * @param selector the selector block to be destroyed
 */
void xnselector_destroy(struct xnselector *selector)
{
	spl_t s;

	inith(&selector->destroy_link);
	xnlock_get_irqsave(&nklock, s);
	appendq(&xnselectors, &selector->destroy_link);
	xnlock_put_irqrestore(&nklock, s);
	rthal_apc_schedule(xnselect_apc);
}
コード例 #2
0
void pse51_schedule_lostage(int request, void *arg, size_t size)
{
	int cpuid = rthal_processor_id(), reqnum;
	struct pse51_lostageq_t *rq = &pse51_lostageq[cpuid];
	spl_t s;

	/* Signal the APC, to have it delegate signals to Linux. */
	splhigh(s);
	reqnum = rq->in;
	rq->req[reqnum].type = request;
	rq->req[reqnum].arg = arg;
	rq->req[reqnum].size = size;
	rq->in = (reqnum + 1) & (PSE51_LO_MAX_REQUESTS - 1);
	splexit(s);

	rthal_apc_schedule(pse51_lostage_apc);
}