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

📄 cpu_task.h

📁 uT Kernel os source code for AT91
💻 H
字号:
/* *---------------------------------------------------------------------- *    micro T-Kernel * *    Copyright (C) 2006-2007 by Ken Sakamura. All rights reserved. *    micro T-Kernel is distributed under the micro T-License. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2007/03/26. * *---------------------------------------------------------------------- *//* *	cpu_task.h (H8S2212) *	CPU-Dependent Task Start Processing */#ifndef _CPU_TASK_#define _CPU_TASK_#include "cpu_insn.h"/* * System stack configuration at task startup */typedef struct {	UW	er[7]; /* er6-er0 */	UW	sccr_spc;} 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) * 1 )	/* To 'sccr_spc' position *//* * Initial value for task startup */#define INIT_SR	( 0 )/* * Create stack frame for task startup *	Call from 'make_dormant()' */Inline void knl_setup_context( TCB *tcb ){	SStackFrame	*ssp;	UW		ccr;	ssp = (SStackFrame*)((UB*)(tcb->isstack) - (UB*)(sizeof(SStackFrame)));	ccr = INIT_SR;	/* CPU context initialization */	/* Initial SR */ /* Task startup address */	ssp->sccr_spc = (ccr << 24) | ((UW)tcb->task & 0x00ffffffUL);	tcb->tskctxb.ssp = ssp;			/* System stack */}/* * Set task startup code *	Called by 'tk_sta_tsk()' processing. */Inline void knl_setup_stacd( TCB *tcb, INT stacd ){	SStackFrame	*ssp = tcb->tskctxb.ssp;	ssp->er[6] = stacd;				/* er0 */	ssp->er[5] = (VW)tcb->exinf;	/* er1 */}/* * Delete task contexts */Inline void knl_cleanup_context( TCB *tcb ){}#endif /* _CPU_TASK_ */

⌨️ 快捷键说明

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