This commit is contained in:
施羿廷 authored and ytshih committed 2026-04-02 22:50:58 +08:00
1 parent fe65d46df7
commit b582884995
19 files changed
+389 -189

No files matched your search

+8
View File
@@ -172,3 +172,11 @@ ConsoleOutput::PutChar(char ch)
kernel->interrupt->Schedule(this, ConsoleTime, ConsoleWriteInt);
}
void
ConsoleOutput::PutString(char *str)
{
ASSERT(putBusy == FALSE);
WriteFile(writeFileNo, str, strlen(str));
putBusy = TRUE;
kernel->interrupt->Schedule(this, ConsoleTime, ConsoleWriteInt);
}
+1
View File
@@ -76,6 +76,7 @@ class ConsoleOutput : public CallBackObj {
void PutChar(char ch); // Write "ch" to the console display,
// and return immediately. "callWhenDone"
// will called when the I/O completes.
void PutString(char *str);
void CallBack(); // Invoked when next character can be put
// out to the display.
+1 -1
View File
@@ -95,7 +95,7 @@ class Interrupt {
void Halt(); // quit and print out stats
void PrintInt(int number);
int CreateFile(char *filename);
int CreateFile(char *filename);
void YieldOnReturn(); // cause a context switch on return
// from an interrupt handler