colonel.exe 🤑, refactor all include directives, AHCI is now interrupt driven, upgrades to IDE, implemented I/O Request Packets, fix numerous keyboard issues, change all for (;;) and while (1) to while (true), DbgPrint guarded by spinlock, fix KeSignalEvent, major KernelMain refactor, added SystemInitThread because of new blocking I/O, replace memcpy manouvers with strncpy and strncat, add: run for ide, runa for ahci, rund for debug and ide, runad for debug and ahci.
This commit is contained in:
1 parent
7f4052f41c
commit
9fa2a7e0db
61 files changed
+1311
-456
No files matched your search
@@ -1,8 +1,8 @@
|
||||
// ob_object.c - executive object manager
|
||||
#include "ob_object.h"
|
||||
#include "mm_virt.h" // MmAllocatePool / MmFreePool
|
||||
#include <string.h>
|
||||
#include <intrin.h>
|
||||
#include <ob_object.h>
|
||||
#include <mm_virt.h>
|
||||
|
||||
OBJECT* ObAllocateObject(OBJECT_TYPE type, size_t size) {
|
||||
if (size < sizeof(OBJECT)) size = sizeof(OBJECT);
|
||||
@@ -13,7 +13,7 @@ OBJECT* ObAllocateObject(OBJECT_TYPE type, size_t size) {
|
||||
memset(obj, 0, size);
|
||||
obj->Type = type;
|
||||
obj->RefCount = 1;
|
||||
obj->Destroy = (void *)0; /* caller fills this in */
|
||||
obj->Destroy = (void *)0; // caller fills this in
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void ObDereferenceObject(OBJECT* object) {
|
||||
if (!object) return;
|
||||
long prev = _InterlockedDecrement(&object->RefCount);
|
||||
if (prev == 0) {
|
||||
/* Reference count hit zero - run the destructor then free. */
|
||||
// Reference count hit zero - run the destructor then free.
|
||||
if (object->Destroy) {
|
||||
object->Destroy(object);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user