您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ touch_nmi_watchdog函数代码示例

51自学网 2021-06-03 08:55:54
  C++
这篇教程C++ touch_nmi_watchdog函数代码示例写得很实用,希望能帮到您。

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

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

示例1: boot_delay_msec

static void boot_delay_msec(void){	unsigned long long k;	unsigned long timeout;	if (boot_delay == 0 || system_state != SYSTEM_BOOTING)		return;	k = (unsigned long long)loops_per_msec * boot_delay;	timeout = jiffies + msecs_to_jiffies(boot_delay);	while (k) {		k--;		cpu_relax();		/*		 * use (volatile) jiffies to prevent		 * compiler reduction; loop termination via jiffies		 * is secondary and may or may not happen.		 */		if (time_after(jiffies, timeout))			break;		touch_nmi_watchdog();	}}
开发者ID:m4ttyw,项目名称:linux_kernel_TF101,代码行数:24,


示例2: kdb_bt1

static intkdb_bt1(struct task_struct *p, unsigned long mask,        int argcount, int btaprompt){    char buffer[2];    if (kdb_getarea(buffer[0], (unsigned long)p) ||            kdb_getarea(buffer[0], (unsigned long)(p+1)-1))        return KDB_BADADDR;    if (!kdb_task_state(p, mask))        return 0;    kdb_printf("Stack traceback for pid %d/n", p->pid);    kdb_ps1(p);    kdb_show_stack(p, NULL);    if (btaprompt) {        kdb_getstr(buffer, sizeof(buffer),                   "Enter <q> to end, <cr> to continue:");        if (buffer[0] == 'q') {            kdb_printf("/n");            return 1;        }    }    touch_nmi_watchdog();    return 0;}
开发者ID:Scorpio92,项目名称:mstar6a918,代码行数:24,


示例3: show_stack

void show_stack(struct task_struct *tsk, unsigned long * rsp){	unsigned long *stack;	int i;	const int cpu = safe_smp_processor_id();	unsigned long *irqstack_end = (unsigned long *) (cpu_pda[cpu].irqstackptr);	unsigned long *irqstack = (unsigned long *) (cpu_pda[cpu].irqstackptr - IRQSTACKSIZE);    	// debugging aid: "show_stack(NULL, NULL);" prints the	// back trace for this cpu.	if (rsp == NULL) {		if (tsk)			rsp = (unsigned long *)tsk->thread.rsp;		else			rsp = (unsigned long *)&rsp;	}	stack = rsp;	for(i=0; i < kstack_depth_to_print; i++) {		if (stack >= irqstack && stack <= irqstack_end) {			if (stack == irqstack_end) {				stack = (unsigned long *) (irqstack_end[-1]);				printk(" <EOI> ");			}		} else {		if (((long) stack & (THREAD_SIZE-1)) == 0)			break;		}		if (i && ((i % 4) == 0))			printk("/n       ");		printk("%016lx ", *stack++);		touch_nmi_watchdog();	}	show_trace((unsigned long *)rsp);}
开发者ID:gnensis,项目名称:linux-2.6.15,代码行数:36,


示例4: panic

NORET_TYPE void panic(const char * fmt, ...){	long i;	static char buf[1024];	va_list args;#if defined(CONFIG_ARCH_S390)        unsigned long caller = (unsigned long) __builtin_return_address(0);#endif	bust_spinlocks(1);	va_start(args, fmt);	vsnprintf(buf, sizeof(buf), fmt, args);	va_end(args);	printk(KERN_EMERG "Kernel panic - not syncing: %s/n",buf);	bust_spinlocks(0);#ifdef CONFIG_SMP	smp_send_stop();#endif	notifier_call_chain(&panic_notifier_list, 0, buf);	if (!panic_blink)		panic_blink = no_blink;	if (panic_timeout > 0)	{		/*	 	 * Delay timeout seconds before rebooting the machine. 		 * We can't use the "normal" timers since we just panicked..	 	 */		printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);		for (i = 0; i < panic_timeout*1000; ) {			touch_nmi_watchdog();			i += panic_blink(i);			mdelay(1);			i++;		}		/*		 *	Should we run the reboot notifier. For the moment Im		 *	choosing not too. It might crash, be corrupt or do		 *	more harm than good for other reasons.		 */		machine_restart(NULL);	}#ifdef __sparc__	{		extern int stop_a_enabled;		/* Make sure the user can actually press Stop-A (L1-A) */		stop_a_enabled = 1;		printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom/n");	}#endif#if defined(CONFIG_ARCH_S390)        disabled_wait(caller);#endif	local_irq_enable();	for (i = 0;;) {		i += panic_blink(i);		mdelay(1);		i++;	}}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:63,


示例5: print_trace_address

/* * Print one address/symbol entries per line. */static void print_trace_address(void *data, unsigned long addr, int reliable){	touch_nmi_watchdog();	printk(data);	printk_address(addr, reliable);}
开发者ID:nosnilwar,项目名称:linux-raw-gov-2.6.38.8,代码行数:9,


示例6: panic

//.........这里部分代码省略.........		 * works in addition to stopping other CPUs.		 */		crash_smp_send_stop();	}	/*	 * Run any panic handlers, including those that might need to	 * add information to the kmsg dump output.	 */	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);	/* Call flush even twice. It tries harder with a single online CPU */	printk_safe_flush_on_panic();	kmsg_dump(KMSG_DUMP_PANIC);	/*	 * If you doubt kdump always works fine in any situation,	 * "crash_kexec_post_notifiers" offers you a chance to run	 * panic_notifiers and dumping kmsg before kdump.	 * Note: since some panic_notifiers can make crashed kernel	 * more unstable, it can increase risks of the kdump failure too.	 *	 * Bypass the panic_cpu check and call __crash_kexec directly.	 */	if (_crash_kexec_post_notifiers)		__crash_kexec(NULL);#ifdef CONFIG_VT	unblank_screen();#endif	console_unblank();	/*	 * We may have ended up stopping the CPU holding the lock (in	 * smp_send_stop()) while still having some valuable data in the console	 * buffer.  Try to acquire the lock then release it regardless of the	 * result.  The release will also print the buffers out.  Locks debug	 * should be disabled to avoid reporting bad unlock balance when	 * panic() is not being callled from OOPS.	 */	debug_locks_off();	console_flush_on_panic();	panic_print_sys_info();	if (!panic_blink)		panic_blink = no_blink;	if (panic_timeout > 0) {		/*		 * Delay timeout seconds before rebooting the machine.		 * We can't use the "normal" timers since we just panicked.		 */		pr_emerg("Rebooting in %d seconds../n", panic_timeout);		for (i = 0; i < panic_timeout * 1000; i += PANIC_TIMER_STEP) {			touch_nmi_watchdog();			if (i >= i_next) {				i += panic_blink(state ^= 1);				i_next = i + 3600 / PANIC_BLINK_SPD;			}			mdelay(PANIC_TIMER_STEP);		}	}	if (panic_timeout != 0) {		/*		 * This will not be a clean reboot, with everything		 * shutting down.  But if there is a chance of		 * rebooting the system it will be rebooted.		 */		emergency_restart();	}#ifdef __sparc__	{		extern int stop_a_enabled;		/* Make sure the user can actually press Stop-A (L1-A) */		stop_a_enabled = 1;		pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break/n"			 "twice on console to return to the boot prom/n");	}#endif#if defined(CONFIG_S390)	{		unsigned long caller;		caller = (unsigned long)__builtin_return_address(0);		disabled_wait(caller);	}#endif	pr_emerg("---[ end Kernel panic - not syncing: %s ]---/n", buf);	local_irq_enable();	for (i = 0; ; i += PANIC_TIMER_STEP) {		touch_softlockup_watchdog();		if (i >= i_next) {			i += panic_blink(state ^= 1);			i_next = i + 3600 / PANIC_BLINK_SPD;		}		mdelay(PANIC_TIMER_STEP);	}}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:101,


示例7: print_trace_address

/* * Print one address/symbol entries per line. */static int print_trace_address(void *data, unsigned long addr, int reliable){	touch_nmi_watchdog();	printk_stack_address(addr, reliable, data);	return 0;}
开发者ID:JaneDu,项目名称:ath,代码行数:9,


示例8: panic

NORET_TYPE void panic(const char * fmt, ...){	long i;	static char buf[1024];	va_list args;#if defined(CONFIG_S390)	unsigned long caller = (unsigned long) __builtin_return_address(0);#endif	/*	 * It's possible to come here directly from a panic-assertion and not	 * have preempt disabled. Some functions called from here want	 * preempt to be disabled. No point enabling it later though...	 */	preempt_disable();	bust_spinlocks(1);	va_start(args, fmt);	vsnprintf(buf, sizeof(buf), fmt, args);	va_end(args);	printk(KERN_EMERG "Kernel panic - not syncing: %s/n",buf);	bust_spinlocks(0);	/*	 * If we have crashed and we have a crash kernel loaded let it handle	 * everything else.	 * Do we want to call this before we try to display a message?	 */	crash_kexec(NULL);#ifdef CONFIG_SMP	/*	 * Note smp_send_stop is the usual smp shutdown function, which	 * unfortunately means it may not be hardened to work in a panic	 * situation.	 */	smp_send_stop();#endif	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);	if (!panic_blink)		panic_blink = no_blink;	if (panic_timeout > 0) {		/*	 	 * Delay timeout seconds before rebooting the machine. 		 * We can't use the "normal" timers since we just panicked..	 	 */		printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);		for (i = 0; i < panic_timeout*1000; ) {			touch_nmi_watchdog();			i += panic_blink(i);			mdelay(1);			i++;		}		/*	This will not be a clean reboot, with everything		 *	shutting down.  But if there is a chance of		 *	rebooting the system it will be rebooted.		 */		emergency_restart();	}#ifdef __sparc__	{		extern int stop_a_enabled;		/* Make sure the user can actually press Stop-A (L1-A) */		stop_a_enabled = 1;		printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom/n");	}#endif#if defined(CONFIG_S390)	disabled_wait(caller);#endif	local_irq_enable();	for (i = 0;;) {		touch_softlockup_watchdog();		i += panic_blink(i);		mdelay(1);		i++;	}}
开发者ID:mikeberkelaar,项目名称:grhardened,代码行数:81,


示例9: enable_ioapic_nmi_watchdog

static void enable_ioapic_nmi_watchdog(void){	on_each_cpu(enable_ioapic_nmi_watchdog_single, NULL, 1);	touch_nmi_watchdog();}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:5,


示例10: sec_debug_panic_handler

static int sec_debug_panic_handler(struct notifier_block *nb,		unsigned long l, void *buf){	unsigned int len, i;#if defined(CONFIG_FB_MSM_MDSS_SAMSUNG)	samsung_mdss_image_dump();#endif	emerg_pet_watchdog();//CTC-should be modify	sec_debug_set_upload_magic(SECDEBUG_MODE);	len = strnlen(buf, 80);	if (!strncmp(buf, "User Fault", len))		sec_debug_set_upload_cause(UPLOAD_CAUSE_USER_FAULT);	else if (!strncmp(buf, "Crash Key", len))		sec_debug_set_upload_cause(UPLOAD_CAUSE_FORCED_UPLOAD);	else if (!strncmp(buf, "CP Crash", len))		sec_debug_set_upload_cause(UPLOAD_CAUSE_CP_ERROR_FATAL);	else if (!strncmp(buf, "MDM Crash", len))		sec_debug_set_upload_cause(UPLOAD_CAUSE_MDM_ERROR_FATAL);	else if (strnstr(buf, "external_modem", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_MDM_ERROR_FATAL);	else if (strnstr(buf, "esoc0 crashed", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_MDM_ERROR_FATAL);	else if (strnstr(buf, "modem", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_MODEM_RST_ERR);	else if (strnstr(buf, "riva", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_RIVA_RST_ERR);	else if (strnstr(buf, "lpass", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_LPASS_RST_ERR);	else if (strnstr(buf, "dsps", len) != NULL)		sec_debug_set_upload_cause(UPLOAD_CAUSE_DSPS_RST_ERR);	else if (!strnicmp(buf, "subsys", len))		sec_debug_set_upload_cause(UPLOAD_CAUSE_PERIPHERAL_ERR);	else		sec_debug_set_upload_cause(UPLOAD_CAUSE_KERNEL_PANIC);	if (!enable) {#ifdef CONFIG_SEC_DEBUG_LOW_LOG		sec_debug_hw_reset();#endif		return -EPERM;	}	/* enable after SSR feature	ssr_panic_handler_for_sec_dbg();*/	for (i = 0; i < 10; i++) 	{	   touch_nmi_watchdog();	   mdelay(100);	}	/* save context here so that function call after this point doesn't	 * corrupt stacks below the saved sp */ 	sec_debug_save_context();	sec_debug_hw_reset();	return 0;}
开发者ID:DaMadOne,项目名称:android_kernel_samsung_msm8976,代码行数:61,


示例11: panic

//.........这里部分代码省略.........				printk("Sorry. Can't creat panic file/n");			else {				//				vfs_write(filp, PANIC_Base, strlen(PANIC_Base),				while(count) {					memset(buf,0x0,1024);					if(count > 1024) {						memcpy(buf,PANIC_Base+chr_count,1024);						writelen = filp->f_op->write(filp,buf,1024,&filp->f_pos);						if(writelen == 0)							printk("Write Error!!/n");						else							filp->f_op->flush(filp,id);						chr_count += 1024;						count -= 1024;					} else {						memcpy(buf,PANIC_Base+chr_count,count);						writelen = filp->f_op->write(filp,buf,count,&filp->f_pos);						if(writelen == 0)							printk("Write Error/n");						else							filp->f_op->flush(filp,id);						chr_count += count;						count -= count;					}   				}			}			set_fs(old_fs);			preempt_disable();		}		count = PANIC_Current - PANIC_Base;		printk("/nPanic Dump END,  panic message size is : %d/n",count);	}	else {#if 0		/* Reset Target */#else				while (1);#endif	}#endif	/*	 * If we have crashed and we have a crash kernel loaded let it handle	 * everything else.	 * Do we want to call this before we try to display a message?	 */	crash_kexec(NULL);#ifdef CONFIG_SMP	/*	 * Note smp_send_stop is the usual smp shutdown function, which	 * unfortunately means it may not be hardened to work in a panic	 * situation.	 */	smp_send_stop();#endif	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);	if (!panic_blink)		panic_blink = no_blink;	if (panic_timeout > 0) {		/*	 	 * Delay timeout seconds before rebooting the machine. 		 * We can't use the "normal" timers since we just panicked..	 	 */		printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);		for (i = 0; i < panic_timeout*1000; ) {			touch_nmi_watchdog();			i += panic_blink(i);			mdelay(1);			i++;		}		/*	This will not be a clean reboot, with everything		 *	shutting down.  But if there is a chance of		 *	rebooting the system it will be rebooted.		 */		emergency_restart();	}#ifdef __sparc__	{		extern int stop_a_enabled;		/* Make sure the user can actually press Stop-A (L1-A) */		stop_a_enabled = 1;		printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom/n");	}#endif#if defined(CONFIG_S390)	disabled_wait(caller);#endif	local_irq_enable();	for (i = 0;;) {		touch_softlockup_watchdog();		i += panic_blink(i);		mdelay(1);		i++;	}}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:101,


示例12: printk_stack_address

static void printk_stack_address(unsigned long address, int reliable,				 char *log_lvl){	touch_nmi_watchdog();	printk("%s %s%pB/n", log_lvl, reliable ? "" : "? ", (void *)address);}
开发者ID:AshishNamdev,项目名称:linux,代码行数:6,



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


C++ toucheventselector函数代码示例
C++ touch函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。