def_mts.h

来自「小型操作系统,以VC为开发环境,需要boachs调试」· C头文件 代码 · 共 68 行

H
68
字号
/***************************************************************************
**     File name   : def_mts.h
**     Author      : 
**     Create date :
**
**	   Comment:
**        
**
**     Revisions:
**     $Log: def_mts.h,v $
**     Revision 1.3  2005/07/27 15:55:31  x.cheng
**     new function prototype appending...
**
**     Revision 1.2  2005/07/27 07:37:16  x.cheng
**     two function prototype added
**
**     Revision 1.1.1.1  2005/07/27 06:53:15  x.cheng
**     add into repositories
**
***************************************************************************/
#ifndef __DEF_MTS_H__
#define __DEF_MTS_H__

#include "..\..\inc\task.h"
#include "..\..\inc\wqueue.h"

#define TASK_KERNEL_STACK_SIZE		0x2000	// Stack size in byte for every kernel-mode task

#define TASK_USER_STACK_START	0xC0000000	// The address where the user-privilege task stack is placed.
#define TASK_USER_HEAP_START	0x40000000	// The start of the heap for a user-mode task.
#define TASK_USER_HEAP_SIZE		0x40000000	// The size of the heap for a user-mode task.

/*******************************************
 * extern variable
 ******************************************/
//#ifndef __MTS_SRC__
/*****in file mt1_process.c********/
ts_Task* pstMt1CreateProcess(void *pvRoutine, char *szName, int iPrivilege);

/*****in file mt2_thread.c********/
ts_Task* pstMt2CreateThread(void *pvRoutine, char *szName);

/* in file mt5_util.c */
inline void Mt5BrowserQueue( ts_QueueNode **ppstHeadNode, char *szQueueName);

void vMt5CreateVirtualSpace(ts_Task* pstTask);

unsigned long *pulMt5SetupStack(unsigned long ulStackStart);

inline int iMt5GeneratePid( void );

inline void vMt5SwitchTaskMMU( ts_Task *pstPrevTask, ts_Task *pstNextTask );

void vMt5PrintProcessInfo();

ts_Task* pstMt5GetTaskInfo( int iPid );

void vMt5TaskSleep(ts_Task **ppstTask);

void vMt5TaskWakeup( ts_Task *pstTask );

void vMt5WakeupWaitQueue(ts_WaitQueueNode *pstWaitQueue );

//#endif /* end of __MTS_SRC__ */

#endif /* end of  __DEF_MTS_H__ */

⌨️ 快捷键说明

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