This commit is contained in:
施羿廷
2024-10-04 19:53:08 +00:00
parent 0284b75ab6
commit ba9ef819ba
59 changed files with 419 additions and 193 deletions

View File

@@ -36,15 +36,15 @@ class Kernel {
void Initialize(); // initialize the kernel -- separated
// from constructor because
// refers to "kernel" as a global
void ExecAll();
int Exec(char* name);
void ExecAll();
int Exec(char* name);
void ThreadSelfTest(); // self test of threads and synchronization
void ConsoleTest(); // interactive console self test
void NetworkTest(); // interactive 2-machine network test
Thread* getThread(int threadID){return t[threadID];}
int CreateFile(char* filename); // fileSystem call
Thread* getThread(int threadID){return t[threadID];}
int CreateFile(char* filename); // fileSystem call
// These are public for notational convenience; really,
// they're global variables used everywhere.
@@ -66,10 +66,10 @@ class Kernel {
private:
Thread* t[10];
char* execfile[10];
int execfileNum;
int threadNum;
Thread* t[10];
char* execfile[10];
int execfileNum;
int threadNum;
bool randomSlice; // enable pseudo-random time slicing
bool debugUserProg; // single step user program
double reliability; // likelihood messages are dropped