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

📄 system.h

📁 本次实验的目的在于掌握使用nachos中的线程序解决较为复杂的并发问题。实验内容分三部分:实现事件栅栏原语并进行正确性测试;实现闹钟原语并进行正确性测试;利用事件栅栏和闹钟原语来解决电梯问题(详细内容
💻 H
字号:
// system.h //	All global variables used in Nachos are defined here.//// 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.#ifndef SYSTEM_H#define SYSTEM_H#include "copyright.h"#include "utility.h"#include "thread.h"#include "scheduler.h"#include "interrupt.h"#include "stats.h"#include "timer.h"// Initialization and cleanup routinesextern void Initialize(int argc, char **argv); 	// Initialization,						// called before anything elseextern void Cleanup();				// Cleanup, called when						// Nachos is done.extern Thread *currentThread;			// the thread holding the CPUextern Thread *threadToBeDestroyed;  		// the thread that just finishedextern Scheduler *scheduler;			// the ready listextern Interrupt *interrupt;			// interrupt statusextern Statistics *stats;			// performance metricsextern Timer *timer;				// the hardware alarm clock#ifdef USER_PROGRAM#include "machine.h"extern Machine* machine;	// user program memory and registers#endif#ifdef FILESYS_NEEDED 		// FILESYS or FILESYS_STUB #include "filesys.h"extern FileSystem  *fileSystem;#endif#ifdef FILESYS#include "synchdisk.h"extern SynchDisk   *synchDisk;#endif#ifdef NETWORK#include "post.h"extern PostOffice* postOffice;#endif#endif // SYSTEM_H

⌨️ 快捷键说明

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