📄 ut11_kpage.c
字号:
/***************************************************************************
** File name : kpagedaemon.c
** Author : x.cheng
** Create date :
**
** Comment:
** The page manager.
**
** Revisions:
** $Log: ut11_kpage.c,v $
** Revision 1.2 2005/07/27 15:52:16 x.cheng
** bug fix, schedule in endless loop.
**
** Revision 1.1.1.1 2005/07/27 06:53:15 x.cheng
** add into repositories
**
**
***************************************************************************/
#include "const.h"
#include "type.h"
#include "stdarg.h"
#include "stdlib.h"
#include "queue.h"
#include "..\..\inc\i386\page.h" //kernel\inc\i386
#include "..\..\inc\i386\dscr.h"
#include "..\..\inc\i386\x86.h"
#include "..\..\inc\i386\system.h"
#include "..\..\inc\task.h" //kernel\inc
#include "..\..\inc\vga.h"
#include "..\..\inc\mts.h"
#include "..\..\inc\pmm.h"
#include "..\..\inc\tui.h"
/* debug preprocessor instrument
#ifdef _DEBUG__
#ifdef _DEBUG_SRV__
#endif
#endif
***************************/
/************************************************
*golable variabel */
ts_Task *g_pstKpageTask = NULL;
/************************************************************
*************************************************************
** Function Name: vUt11KernelPage
** Author: x.cheng
**
** Comment:
** This special kernel thread provides to free the
** memory space and resources owned by the zombie tasks.
**
** List of parameters:
**
**
** Return value:
**
**
** Revisions:
**
*************************************************************
*************************************************************/
void vUt11KernelPage()
{
ts_Console *pstConsole = pstTuiGetConsoleAddress(iTuiGetCurrentConsole());
unsigned long ulFlags;
#ifdef _DEBUG__
#ifdef _DEBUG_SRV__
kprintf("%s: enter page daemon\n", __FUNCTION__);
#endif
#endif
while( TRUE ) {
SaveEflagsAndCli(ulFlags);
//vVgaConsolePutString(pstConsole, "page daemon: ");
#ifdef _DEBUG__
#ifdef _DEBUG_SRV__
kprintf("page daemon thread....\n");
//vMtsTaskSleep(&g_pstKpageTask);
#endif
#endif
RestoreEflags(ulFlags);
vMtsTaskSleep(&g_pstKpageTask);
vMtsSchedule();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -