replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.
This commit is contained in:
1 parent
d36f19509c
commit
36eef8f58d
696 files changed
+147281
-7530
No files matched your search
@@ -70,7 +70,6 @@ typedef struct SCREEN_CELL {
|
||||
static SCREEN_CELL gScreenCache[MAX_SCREEN_COLS * MAX_SCREEN_ROWS];
|
||||
static bool gScreenCacheValid = false;
|
||||
|
||||
// Implements the invalidate screen cache operation.
|
||||
static void invalidate_screen_cache(void) {
|
||||
gScreenCacheValid = false;
|
||||
}
|
||||
@@ -127,7 +126,6 @@ static void draw_text(int col, int row, const char* s, uint32_t fg, uint32_t bg)
|
||||
while (*s && col < gCols) put_cell(col++, row, *s++, fg, bg);
|
||||
}
|
||||
|
||||
// Implements the msg set operation.
|
||||
static void msg_set(const char* s) {
|
||||
size_t n = strlen(s);
|
||||
if (n >= sizeof(gMessage)) n = sizeof(gMessage) - 1;
|
||||
@@ -158,7 +156,6 @@ static void append_u32(char* b, size_t cap, size_t* p, uint32_t v) {
|
||||
while (n > 0) append_char(b, cap, p, tmp[--n]);
|
||||
}
|
||||
|
||||
// Implements the key to char operation.
|
||||
static char key_to_char(INPUT_KEY key, uint32_t mods) {
|
||||
if (key >= INPUT_KEY_A && key <= INPUT_KEY_Z) {
|
||||
bool shifted = (mods & INPUT_MOD_SHIFT) != 0;
|
||||
@@ -188,7 +185,6 @@ static char key_to_char(INPUT_KEY key, uint32_t mods) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Implements the clamp cursor operation.
|
||||
static void clamp_cursor(void) {
|
||||
if (gLineCount < 1) gLineCount = 1;
|
||||
if (gCy < 0) gCy = 0;
|
||||
@@ -197,7 +193,6 @@ static void clamp_cursor(void) {
|
||||
if (gCx > gLines[gCy].len) gCx = gLines[gCy].len;
|
||||
}
|
||||
|
||||
// Implements the ensure visible operation.
|
||||
static void ensure_visible(void) {
|
||||
int textRows = gRows - 2;
|
||||
if (textRows < 1) textRows = 1;
|
||||
@@ -211,7 +206,6 @@ static void ensure_visible(void) {
|
||||
if (gLeft < 0) gLeft = 0;
|
||||
}
|
||||
|
||||
// Implements the render operation.
|
||||
static void render(void) {
|
||||
update_screen_size();
|
||||
|
||||
@@ -275,7 +269,6 @@ static void insert_char_at_cursor(char c) {
|
||||
gDirty = true;
|
||||
}
|
||||
|
||||
// Implements the newline at cursor operation.
|
||||
static void newline_at_cursor(void) {
|
||||
if (gLineCount >= MAX_LINES) { msg_set("too many lines"); return; }
|
||||
|
||||
@@ -297,7 +290,6 @@ static void newline_at_cursor(void) {
|
||||
gDirty = true;
|
||||
}
|
||||
|
||||
// Implements the backspace at cursor operation.
|
||||
static void backspace_at_cursor(void) {
|
||||
if (gCx > 0) {
|
||||
LINE* ln = &gLines[gCy];
|
||||
@@ -401,7 +393,6 @@ static void save_file(void) {
|
||||
msg_set("saved");
|
||||
}
|
||||
|
||||
// Implements the reset buffer operation.
|
||||
static void reset_buffer(void) {
|
||||
gLineCount = 1;
|
||||
gLines[0].len = 0;
|
||||
@@ -450,13 +441,11 @@ static void load_file(void) {
|
||||
msg_set(truncated ? "loaded, truncated long file" : "loaded");
|
||||
}
|
||||
|
||||
// Implements the skip spaces operation.
|
||||
static const char* skip_spaces(const char* s) {
|
||||
while (s && (*s == ' ' || *s == '\t')) s++;
|
||||
return s;
|
||||
}
|
||||
|
||||
// Implements the skip token operation.
|
||||
static const char* skip_token(const char* s) {
|
||||
s = skip_spaces(s);
|
||||
if (!s || !*s) return s;
|
||||
@@ -500,7 +489,6 @@ static void parse_filename_from_cmdline(void) {
|
||||
strcpy(gFilename, "untitled.txt");
|
||||
}
|
||||
|
||||
// Implements the editor loop operation.
|
||||
static void editor_loop(void) {
|
||||
while (true) {
|
||||
render();
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
!include $(BASEDIR)\makefile.def
|
||||
@@ -0,0 +1,7 @@
|
||||
TARGETNAME=edit
|
||||
TARGETPATH=obj
|
||||
TARGETTYPE=PROGRAM
|
||||
FLAVOR=USER
|
||||
TARGETLIBS="$(BASEDIR)\bin\syscall.lib" "$(BASEDIR)\bin\libc.lib" "$(BASEDIR)\bin\native_runtime.lib"
|
||||
EXTRA_LFLAGS=/ENTRY:NtlNativeStart
|
||||
SOURCES=@/code/user/apps/edit/edit.c
|
||||
Reference in new issue
Block a user