《C++嵌入系统编程》实例源代码,对做嵌入式开发有一定的参考作用

源代码在线查看: sched.h

软件大小: 116 K
上传用户: ddddong
关键词: 嵌入系统 嵌入式开发 编程 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				/**********************************************************************
				 *
				 * Filename:    sched.h
				 * 
				 * Description: Header file for the Sched class.
				 *
				 * Notes:       
				 *
				 * 
				 * Copyright (c) 1998 by Michael Barr.  This software is placed into
				 * the public domain and may be used for any purpose.  However, this
				 * notice must not be changed or removed and no warranty is either
				 * expressed or implied by its publication or distribution.
				 **********************************************************************/
				
				#ifndef _SCHED_H
				#define _SCHED_H
				
				
				class Sched
				{
				    public:
				
				        Sched();
				
				        void  start();
				        void  schedule();
				
				        void  enterIsr();
				        void  exitIsr();
				
				        static Task *    pRunningTask;
				        static TaskList  readyList; 
				
				        enum SchedState { Uninitialized, Initialized, Started };
				
				    private:
				
				        static SchedState  state;
				        static Task        idleTask;
				        static int         interruptLevel;
				        static int         bSchedule;
				};
				
				extern Sched os;
				
				
				#endif	/* _SCHED_H */
							

相关资源