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

📄 cpu_task.h

📁 日本著名的的嵌入式实时操作系统T-Kernel的源码及用户手册。
💻 H
字号:
/* *---------------------------------------------------------------------- *    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. * *---------------------------------------------------------------------- *//* *	cpu_task.h (M32104) *	CPU-Dependant Task Start Processing */#ifndef _CPU_TASK_#define _CPU_TASK_/* * System stack configuration at task startup */typedef struct {	W	acch;	UW	accl;	VW	r0_5[6];	VW	r8_14[7];	UW	psw;	VP	bpc;	VW	r6;	VW	r7;} SStackFrame;/* * Size of system stack area destroyed by 'make_dormant()' * In other words, the size of area required to write by 'setup_context().' */#define	DORMANT_STACK_SIZE	( sizeof(VW) * 4 )	/* To 'psw' *//* * Size of area kept for special use from system stack */#define	RESERVE_SSTACK(tskatr)	0/* * Initial value for task startup */#define	INIT_PSW	( PSW_BIE | PSW_BSM | PSW_SM )/* * Create stack frame for task startup *	Call from 'make_dormant()' */Inline void setup_context( TCB *tcb ){	SStackFrame	*ssp;	ssp = tcb->isstack;	--ssp;	/* CPU context initialization */	ssp->psw = INIT_PSW;		/* Initial PSW */	ssp->bpc = tcb->task;		/* Task startup address */	tcb->tskctxb.ssp = ssp;		/* System stack */}/* * Set task startup code *	Called by 'tk_sta_tsk()' processing. */Inline void setup_stacd( TCB *tcb, INT stacd ){	SStackFrame	*ssp = tcb->tskctxb.ssp;	ssp->r0_5[0] = stacd;	ssp->r0_5[1] = (VW)tcb->exinf;}/* * Delete task contexts */Inline void cleanup_context( TCB *tcb ){	/* None */}#endif /* _CPU_TASK_ */

⌨️ 快捷键说明

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