⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inittask_main.c

📁 日本著名的的嵌入式实时操作系统T-Kernel的源码及用户手册。
💻 C
字号:
/* *---------------------------------------------------------------------- *    T-Kernel * *    Copyright (C) 2004 by Ken Sakamura. All rights reserved. *    T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * *    Version:   1.01.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2004/6/28. * *---------------------------------------------------------------------- *//* *	inittask_main.c (sysmain) *	Initial Task */#include "sysmain.h"#include <sys/rominfo.h>#include <sys/debug.h>typedef INT	(*MAIN_FP)(INT, UB **);#ifndef NO_KERNEL_MESSAGELOCAL const char boot_message[] = {	/* Boot message */	BOOT_MESSAGE};#endif/* ------------------------------------------------------------------------ *//* * Initial task Main *	The available stack size is slightly less than 8KB. *	The initial task is the system task, *	so it should not be deleted. */EXPORT INT init_task_main( void ){	INT	fin;	MAIN_FP	adr;	/* Start message */#ifndef NO_KERNEL_MESSAGE	tm_putstring(boot_message);#endif	fin = 1;	adr = (MAIN_FP)ROMInfo->userinit;	if ( adr != NULL ) {		/* Perform user defined initialization sequence */		fin = (*adr)(0, NULL);	}	if ( fin > 0 ) {		/* Perform user main */		fin = usermain();	}	if ( adr != NULL ) {		/* Perform user defined finalization sequence */		(*adr)(-1, NULL);	}	return fin;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -