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

📄 cpu_context.h

📁 epson usb2.0 控制芯片 S1R72V05 固件程序。
💻 H
字号:
/*
 *  The above copyright holder, limited to cases in which one satisfies
 *  conditions (1) ~ (4) below, or the conditions described in Version 2
 *  of of the GNU Public License officially announced by the Free Software
 *  Foundation, consents to the use, reproduction, alteration, and
 *  redistribution (hereafter called utilization) of this software (this
 *  software includes alterations, likewise below) without compensation.
 *
 *  (1) When this software is utilized in the form of source code, the
 *  above copyright declaration, these conditions of utilization, and the
 *  following stipulation of no guarantee shall be included in unchanged
 *  form inside the source code.
 *  (2) When this software is redistributed in a form in which it can be
 *  used in the development of other software, library form, etc., the above
 *  copyright display, these terms of utilization, and the following
 *  stipulation of no guarantee shall be inserted in documentation accompanying
 *  redistribution (user's manual, etc.).
 *  (3) When this software is redistributed in a form in which it cannot be used
 *  in the development of other software, embedded in devices, etc., one of the
 *  following conditions shall be satisfied.
 *		(a) The above copyright display, these terms of utilization, and the
 *		following stipulation of no guarantee shall be inserted in documentation
 *		accompanying redistribution (user's manual, etc.).
 *		(b) The TOPPERS Project shall be notified owing to a method in which the
 *		form of distribution is decided otherwise.
 *		(4) The above copyright holder and the TOPPERS Project shall be exempt
 *		from responsibility for whatever damages occur either directly or indirectly
 *		through the utilization of this software.
 *
 *	This software is something that is provided with no guarantee. The above copyright
 *  holder and the TOPPERS Project make no guarantee whatsoever in regard to this
 *  software, including the possibility of its application. In addition, the above
 *  copyright holder and the TOPPERS Project shall also not bear responsibility for
 *  whatever damages occur either directly or indirectly through the utilization of
 *  this software.
 *
 *  @(#) $Id: cpu_context.h,v 1.2 2006/07/21 09:50:00 9564907 Exp $
 */


/*
 *  Task context operation routine (for the use of ARM4vT)
 *
 *  This file is separated from cpu_conf.h.Because cpu_conf.h contains the definition that
 *  should be read before TCB is defined,as for this file,it is nessary to read this file after TCB is defined.

 */

#ifndef _CPU_CONTEXT_H_
#define _CPU_CONTEXT_H_

#include "task.h"

/*
 *  Initialize the task context block
 *
 *  When the task shifts to dormant (The task is generated, and the task is ended),
 *  it is called. Basically, it only has to do the processing that sets the task context
 *  block in the state that the task can be started with ate_context and activate_context.
 *  You may do a lot of processing in either function.
 */
Inline void
create_context(TCB *tcb)
{
}

/*
 *  Preparation for the start of the task
 *
 *  When shifting to the ready state(that the task can be executed) from dormant, it is called.
 *
 */
extern void	activate_r(void);

Inline void
activate_context(TCB *tcb)
{
	VW	*sp;

    sp = (VW *)(((SIZE) tcb->tinib->stk) + tcb->tinib->stksz);
	*--sp = (VW)(tcb->tinib->task);
	*--sp = (VW)(tcb->tinib->exinf);
	tcb->tskctxb.sp = sp;
	tcb->tskctxb.pc = activate_r;
}


/*
 * Size of dummy area that ext_tsk allocates in stack
 *
 */
#define	ACTIVATED_STACK_SIZE	(sizeof(VW) * 2)

/*
 * calltex does not use
 */
#define OMIT_CALLTEX

#endif /* _CPU_CONTEXT_H_ */







⌨️ 快捷键说明

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