当前位置: 首页>>代码示例>>C++>>正文


C++ restore_current函数代码示例

本文整理汇总了C++中restore_current函数的典型用法代码示例。如果您正苦于以下问题:C++ restore_current函数的具体用法?C++ restore_current怎么用?C++ restore_current使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了restore_current函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: prom_query_output_device

enum prom_output_device
prom_query_output_device(void)
{
	unsigned long flags;
	int st_p;
	char propb[64];
	char *p;
	int propl;

	switch(prom_vers) {
	case PROM_V0:
	case PROM_SUN4:
		switch(*romvec->pv_stdin) {
		case PROMDEV_SCREEN:	return PROMDEV_OSCREEN;
		case PROMDEV_TTYA:	return PROMDEV_OTTYA;
		case PROMDEV_TTYB:	return PROMDEV_OTTYB;
		};
		break;
	case PROM_V2:
	case PROM_V3:
		spin_lock_irqsave(&prom_lock, flags);
		st_p = (*romvec->pv_v2devops.v2_inst2pkg)(*romvec->pv_v2bootargs.fd_stdout);
		restore_current();
		spin_unlock_irqrestore(&prom_lock, flags);
		propl = prom_getproperty(st_p, "device_type", propb, sizeof(propb));
		if (propl >= 0 && propl == sizeof("display") &&
			strncmp("display", propb, sizeof("display")) == 0)
		{
			return PROMDEV_OSCREEN;
		}
		if(prom_vers == PROM_V3) {
			if(propl >= 0 &&
			    strncmp("serial", propb, sizeof("serial")) != 0)
				return PROMDEV_O_UNK;
			prom_getproperty(prom_root_node, "stdout-path", propb, sizeof(propb));
			if(strncmp(propb, con_name_jmc, CON_SIZE_JMC) == 0)
				return PROMDEV_OTTYA;
			p = propb;
			while(*p) p++; p -= 2;
			if(p[0]==':') {
				if(p[1] == 'a')
					return PROMDEV_OTTYA;
				else if(p[1] == 'b')
					return PROMDEV_OTTYB;
			}
		} else {
			switch(*romvec->pv_stdin) {
			case PROMDEV_TTYA:	return PROMDEV_OTTYA;
			case PROMDEV_TTYB:	return PROMDEV_OTTYB;
			};
		}
		break;
	default:
		;
	};
	return PROMDEV_O_UNK;
}
开发者ID:12019,项目名称:hg556a_source,代码行数:57,代码来源:console.c

示例2: prom_putsegment

/* Set physical segment 'segment' at virtual address 'vaddr' in
 * context 'ctx'.
 */
void
prom_putsegment(int ctx, unsigned long vaddr, int segment)
{
	unsigned long flags;
	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_setctxt))(ctx, (char *) vaddr, segment);
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
	return;
}
开发者ID:nhanh0,项目名称:hah,代码行数:13,代码来源:segment.c

示例3: prom_reboot

/* Reset and reboot the machine with the command 'bcommand'. */
void
prom_reboot(char *bcommand)
{
	unsigned long flags;
	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_reboot))(bcommand);
	/* Never get here. */
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:11,代码来源:misc_32.c

示例4: prom_putsegment

/* Set physical segment 'segment' at virtual address 'vaddr' in
 * context 'ctx'.
 */
void
prom_putsegment(int ctx, unsigned long vaddr, int segment)
{
	unsigned long flags;
	save_flags(flags); cli();
	(*(romvec->pv_setctxt))(ctx, (char *) vaddr, segment);
	restore_current();
	restore_flags(flags);
	return;
}
开发者ID:chinnyannieb,项目名称:empeg-hijack,代码行数:13,代码来源:segment.c

示例5: prom_cmdline

void
prom_cmdline(void)
{
	unsigned long flags;

	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_abort))();
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
	set_auxio(AUXIO_LED, 0);
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:11,代码来源:misc_32.c

示例6: prom_unmapio

/* Unmap an IO/device area that was mapped using the above routine. */
void
prom_unmapio(char *vaddr, unsigned int num_bytes)
{
	unsigned long flags;

	if(num_bytes == 0x0) return;
	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_v2devops.v2_dumb_munmap))(vaddr, num_bytes);
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:12,代码来源:devmap.c

示例7: __prom_nextprop

/* Interal version of nextprop that does not alter return values. */
char * __prom_nextprop(int node, char * oprop)
{
	unsigned long flags;
	char *prop;

	save_and_cli(flags);
	prop = prom_nodeops->no_nextprop(node, oprop);
	restore_current();
	restore_flags(flags);

	return prop;
}
开发者ID:chinnyannieb,项目名称:empeg-hijack,代码行数:13,代码来源:tree.c

示例8: __prom_getsibling

/* Internal version of prom_getsibling that does not alter return values. */
static phandle __prom_getsibling(phandle node)
{
	unsigned long flags;
	phandle cnode;

	spin_lock_irqsave(&prom_lock, flags);
	cnode = prom_nodeops->no_nextnode(node);
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);

	return cnode;
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:13,代码来源:tree_32.c

示例9: spin_lock_irqsave

/* Interal version of nextprop that does not alter return values. */
static char *__prom_nextprop(phandle node, char * oprop)
{
	unsigned long flags;
	char *prop;

	spin_lock_irqsave(&prom_lock, flags);
	prop = prom_nodeops->no_nextprop(node, oprop);
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);

	return prop;
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:13,代码来源:tree_32.c

示例10: prom_inst2pkg

int prom_inst2pkg(int inst)
{
    int node;
    unsigned long flags;

    spin_lock_irqsave(&prom_lock, flags);
    node = (*romvec->pv_v2devops.v2_inst2pkg)(inst);
    restore_current();
    spin_unlock_irqrestore(&prom_lock, flags);
    if (node == -1) return 0;
    return node;
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:12,代码来源:tree.c

示例11: __prom_getchild

/* Internal version of prom_getchild that does not alter return values. */
int __prom_getchild(int node)
{
    unsigned long flags;
    int cnode;

    spin_lock_irqsave(&prom_lock, flags);
    cnode = prom_nodeops->no_child(node);
    restore_current();
    spin_unlock_irqrestore(&prom_lock, flags);

    return cnode;
}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:13,代码来源:tree.c

示例12: prom_halt

void __noreturn
prom_halt(void)
{
	unsigned long flags;
again:
	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_halt))();
	/*                 */
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
	goto again; /*                              */
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:12,代码来源:misc_32.c

示例13: prom_halt

/* Drop into the prom, but completely terminate the program.
 * No chance of continuing.
 */
void
prom_halt(void)
{
	unsigned long flags;
again:
	spin_lock_irqsave(&prom_lock, flags);
	(*(romvec->pv_halt))();
	/* Never get here. */
	restore_current();
	spin_unlock_irqrestore(&prom_lock, flags);
	goto again; /* PROM is out to get me -DaveM */
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:15,代码来源:misc_32.c

示例14: __prom_getsibling

/* Internal version of prom_getsibling that does not alter return values. */
int __prom_getsibling(int node)
{
	unsigned long flags;
	int cnode;

	save_and_cli(flags);
	cnode = prom_nodeops->no_nextnode(node);
	restore_current();
	restore_flags(flags);

	return cnode;
}
开发者ID:chinnyannieb,项目名称:empeg-hijack,代码行数:13,代码来源:tree.c

示例15: prom_inst2pkg

int prom_inst2pkg(int inst)
{
	int node;
	unsigned long flags;
	
	save_flags(flags); cli();
	node = (*romvec->pv_v2devops.v2_inst2pkg)(inst);
	restore_current();
	restore_flags(flags);
	if (node == -1) return 0;
	return node;
}
开发者ID:chinnyannieb,项目名称:empeg-hijack,代码行数:12,代码来源:tree.c


注:本文中的restore_current函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。