亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? console.cpp

?? LINUX 下NACHOS 系統(tǒng)的頁面調度算法的實現(xiàn)
?? CPP
字號:
// console.cc //	Routines to simulate a serial port to a console device.//	A console has input (a keyboard) and output (a display).//	These are each simulated by operations on UNIX files.//	The simulated device is asynchronous,//	so we have to invoke the interrupt handler (after a simulated//	delay), to signal that a byte has arrived and/or that a written//	byte has departed.////  DO NOT CHANGE -- part of the machine emulation//// Copyright (c) 1992-1993 The Regents of the University of California.// All rights reserved.  See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions.#include "copyright.h"#include "console.h"#include "system.h"// Dummy functions because C++ is weird about pointers to member functionsstatic void ConsoleReadPoll(int c) { Console *console = (Console *)c; console->CheckCharAvail(); }static void ConsoleWriteDone(int c){ Console *console = (Console *)c; console->WriteDone(); }//----------------------------------------------------------------------// Console::Console// 	Initialize the simulation of a hardware console device.////	"readFile" -- UNIX file simulating the keyboard (NULL -> use stdin)//	"writeFile" -- UNIX file simulating the display (NULL -> use stdout)// 	"readAvail" is the interrupt handler called when a character arrives//		from the keyboard// 	"writeDone" is the interrupt handler called when a character has//		been output, so that it is ok to request the next char be//		output//----------------------------------------------------------------------Console::Console(char *readFile, char *writeFile, VoidFunctionPtr readAvail, 		VoidFunctionPtr writeDone, int callArg){    if (readFile == NULL)	readFileNo = 0;					// keyboard = stdin    else    	readFileNo = OpenForReadWrite(readFile, TRUE);	// should be read-only    if (writeFile == NULL)	writeFileNo = 1;				// display = stdout    else    	writeFileNo = OpenForWrite(writeFile);    // set up the stuff to emulate asynchronous interrupts    writeHandler = writeDone;    readHandler = readAvail;    handlerArg = callArg;    putBusy = FALSE;    incoming = EOF;    // start polling for incoming packets    interrupt->Schedule(ConsoleReadPoll, (int)this, ConsoleTime, ConsoleReadInt);}//----------------------------------------------------------------------// Console::~Console// 	Clean up console emulation//----------------------------------------------------------------------Console::~Console(){    if (readFileNo != 0)	Close(readFileNo);    if (writeFileNo != 1)	Close(writeFileNo);}//----------------------------------------------------------------------// Console::CheckCharAvail()// 	Periodically called to check if a character is available for//	input from the simulated keyboard (eg, has it been typed?).////	Only read it in if there is buffer space for it (if the previous//	character has been grabbed out of the buffer by the Nachos kernel).//	Invoke the "read" interrupt handler, once the character has been //	put into the buffer. //----------------------------------------------------------------------voidConsole::CheckCharAvail(){    char c;    // schedule the next time to poll for a packet    interrupt->Schedule(ConsoleReadPoll, (int)this, ConsoleTime, 			ConsoleReadInt);    // do nothing if character is already buffered, or none to be read    if ((incoming != EOF) || !PollFile(readFileNo))	return;	      // otherwise, read character and tell user about it    Read(readFileNo, &c, sizeof(char));    incoming = c ;    stats->numConsoleCharsRead++;    (*readHandler)(handlerArg);	}//----------------------------------------------------------------------// Console::WriteDone()// 	Internal routine called when it is time to invoke the interrupt//	handler to tell the Nachos kernel that the output character has//	completed.//----------------------------------------------------------------------voidConsole::WriteDone(){    putBusy = FALSE;    stats->numConsoleCharsWritten++;    (*writeHandler)(handlerArg);}//----------------------------------------------------------------------// Console::GetChar()// 	Read a character from the input buffer, if there is any there.//	Either return the character, or EOF if none buffered.//----------------------------------------------------------------------charConsole::GetChar(){   char ch = incoming;   incoming = EOF;   return ch;}//----------------------------------------------------------------------// Console::PutChar()// 	Write a character to the simulated display, schedule an interrupt //	to occur in the future, and return.//----------------------------------------------------------------------voidConsole::PutChar(char ch){    ASSERT(putBusy == FALSE);    WriteFile(writeFileNo, &ch, sizeof(char));    putBusy = TRUE;    interrupt->Schedule(ConsoleWriteDone, (int)this, ConsoleTime,					ConsoleWriteInt);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲18色成人| 一区二区三区电影在线播| 99亚偷拍自图区亚洲| 夜夜嗨av一区二区三区| 国产色综合一区| 欧美男生操女生| 成人丝袜高跟foot| 美国三级日本三级久久99| 有坂深雪av一区二区精品| 久久婷婷国产综合精品青草| 最新热久久免费视频| 国产亚洲美州欧州综合国| 91麻豆精品国产综合久久久久久| 粉嫩av一区二区三区| 国产91在线看| 国产超碰在线一区| 国产激情一区二区三区四区 | 九九**精品视频免费播放| 亚洲777理论| 日韩精品视频网| 五月天视频一区| 蜜臀av亚洲一区中文字幕| 麻豆免费精品视频| 精品夜夜嗨av一区二区三区| 日韩电影一二三区| 国产一区久久久| 国产成人精品一区二区三区四区| 国产精品996| 91在线一区二区三区| 色哟哟欧美精品| 欧美一区二区三区免费观看视频 | 中文在线免费一区三区高中清不卡| 欧美电影免费观看高清完整版在线观看| 欧美视频第二页| 色狠狠一区二区| 一本大道久久a久久精二百| 91美女在线视频| 欧美性猛片aaaaaaa做受| 欧美写真视频网站| 3751色影院一区二区三区| 91网页版在线| 欧美午夜精品免费| 日韩精品最新网址| 国产欧美日韩亚州综合 | 色婷婷综合久久久| 欧美精品精品一区| 制服丝袜激情欧洲亚洲| 久久久久国产一区二区三区四区| 国产午夜久久久久| 五月激情综合色| 91九色最新地址| 精品国产污网站| 一区二区三区在线视频免费观看| 日日嗨av一区二区三区四区| 99久久精品国产观看| 99久久精品国产麻豆演员表| 国产精品99久久久久久久vr| 在线区一区二视频| 久久美女高清视频| www.亚洲精品| 欧美精品xxxxbbbb| 中文字幕av不卡| 看电视剧不卡顿的网站| 欧美色网一区二区| 亚洲丝袜精品丝袜在线| 美女在线一区二区| 51精品久久久久久久蜜臀| 国产精品久久久久久久久免费桃花 | 91精品免费观看| 国产精品无遮挡| 国产一区二区调教| 777久久久精品| 亚洲成人免费看| 欧美视频精品在线观看| 亚洲精品乱码久久久久久黑人| 成人高清视频免费观看| 国产色一区二区| 99久久久国产精品| 亚洲欧洲av一区二区三区久久| 欧美电影在哪看比较好| 亚洲第一成人在线| 欧美另类一区二区三区| 亚洲成人av免费| 666欧美在线视频| 国产在线视视频有精品| 久久精品无码一区二区三区| 高清不卡一二三区| 国产精品女主播av| av高清不卡在线| 午夜视频在线观看一区二区| 欧美日韩精品一区二区三区四区 | 成人高清av在线| 久久激情五月激情| 91在线你懂得| 亚洲夂夂婷婷色拍ww47| 91免费看`日韩一区二区| 男女视频一区二区| 国产精品视频麻豆| 精品视频一区三区九区| 国产一区高清在线| 一区二区三区91| 国产丝袜在线精品| 欧美亚洲尤物久久| 国产成人精品三级| 奇米四色…亚洲| 一区二区三区精品久久久| 精品国产一区二区三区忘忧草| 色综合天天综合网国产成人综合天| 日韩中文欧美在线| 午夜激情久久久| 午夜天堂影视香蕉久久| 国产精品久久久爽爽爽麻豆色哟哟| 9色porny自拍视频一区二区| 国精产品一区一区三区mba桃花| 亚洲成人免费在线| 亚洲欧美激情小说另类| 欧美精品99久久久**| 在线精品视频一区二区三四| 国产精品系列在线观看| 激情综合五月婷婷| 亚洲成人精品一区二区| 亚洲桃色在线一区| 亚洲丝袜自拍清纯另类| 亚洲天堂免费在线观看视频| 精品国产亚洲一区二区三区在线观看| 欧美不卡一区二区| 亚洲一区二区三区国产| 国产欧美va欧美不卡在线| 国产网站一区二区| 亚洲日本成人在线观看| 亚洲卡通动漫在线| 亚洲免费观看高清完整版在线| 日韩欧美不卡一区| 国产精品素人视频| 亚洲欧洲精品一区二区三区| 国产精品美女一区二区在线观看| 精品日韩一区二区三区| 国产精品少妇自拍| 亚洲激情图片一区| 亚洲一区二区成人在线观看| 午夜国产不卡在线观看视频| 蜜臀av一区二区| 成人美女视频在线看| 在线中文字幕一区二区| 欧美日本乱大交xxxxx| 精品国产一区二区精华| 亚洲乱码国产乱码精品精可以看| 午夜久久福利影院| 国产九九视频一区二区三区| 欧美三级韩国三级日本一级| 国产精品成人网| 美女尤物国产一区| 9色porny自拍视频一区二区| 91精品欧美福利在线观看| 中文字幕一区二区三区精华液| 高清在线不卡av| 欧美在线999| 国产精品久久久久久久浪潮网站 | 日韩一区二区影院| 欧美三级在线播放| 国产精品成人免费在线| 欧美三级韩国三级日本三斤 | 欧美日韩国产天堂| 天天色天天爱天天射综合| 9191成人精品久久| 美女视频黄频大全不卡视频在线播放| 91久久精品日日躁夜夜躁欧美| 国产精品动漫网站| 色综合久久中文综合久久97| 国产精品动漫网站| 欧美影院精品一区| 午夜精品久久久久久久久久久 | 青青草国产精品亚洲专区无| 欧美日韩精品欧美日韩精品 | 国产日韩欧美电影| 欧美丝袜丝交足nylons图片| 日本欧美一区二区三区| 中国av一区二区三区| 欧美综合一区二区| 大白屁股一区二区视频| 久久久久久久av麻豆果冻| 色婷婷久久一区二区三区麻豆| 亚洲成人在线观看视频| 国产欧美一区二区三区沐欲| 色www精品视频在线观看| 久久精品国产99国产| 国产精品成人免费| 精品免费99久久| 欧美在线视频你懂得| 成人a级免费电影| 九九**精品视频免费播放| 天天做天天摸天天爽国产一区| 一区二区三区精品久久久| 亚洲欧美一区二区在线观看| 成人欧美一区二区三区1314| 国产高清久久久久| 久久99精品久久久久久动态图 | 欧美mv和日韩mv的网站| 欧美少妇bbb| 欧美中文字幕一区|