diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-21 09:10:57 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-21 09:10:57 +0200 |
| commit | 0c211cca4d7a4d836f4cb685345e44f3f2814fd1 (patch) | |
| tree | f08901e67cdabe025d8ad40c18c62b27b32c5517 | |
| parent | f022a2afeb7af04ce3ef256ef617d19f07d84d9a (diff) | |
MHR-23: New CoreSystem calls and refactors.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
| -rw-r--r-- | Boot/Sources/.gitkeep (renamed from Boot/Source/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/BootloaderRsrc.rsrc (renamed from Boot/Source/BootloaderRsrc.rsrc) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/.gitkeep (renamed from Boot/Source/HEL/AMD64/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootAHCI.cxx (renamed from Boot/Source/HEL/AMD64/BootAHCI.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootATA.cxx (renamed from Boot/Source/HEL/AMD64/BootATA.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootFileReader.cxx (renamed from Boot/Source/HEL/AMD64/BootFileReader.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootJump.S (renamed from Boot/Source/HEL/AMD64/BootJump.S) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootMain.cxx (renamed from Boot/Source/HEL/AMD64/BootMain.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootPlatform.cxx (renamed from Boot/Source/HEL/AMD64/BootPlatform.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootString.cxx (renamed from Boot/Source/HEL/AMD64/BootString.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootTextWriter.cxx (renamed from Boot/Source/HEL/AMD64/BootTextWriter.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/New+Delete.cxx (renamed from Boot/Source/HEL/AMD64/New+Delete.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/Support.cxx (renamed from Boot/Source/HEL/AMD64/Support.cxx) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/compile_flags.txt (renamed from Boot/Source/HEL/AMD64/compile_flags.txt) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/ARM64/.gitkeep (renamed from Boot/Source/HEL/ARM64/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/POWER/.gitkeep (renamed from Boot/Source/HEL/POWER/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/POWER/CoreBootStartup.S (renamed from Boot/Source/HEL/POWER/CoreBootStartup.S) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/RISCV/.gitkeep (renamed from Boot/Source/HEL/RISCV/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/RISCV/BootRISCV.S (renamed from Boot/Source/HEL/RISCV/BootRISCV.S) | 0 | ||||
| -rw-r--r-- | Boot/Sources/Root/EFI/STARTUP.NSH (renamed from Boot/Source/Root/EFI/STARTUP.NSH) | 0 | ||||
| -rw-r--r-- | Boot/Sources/Root/SplashScreen.fmt (renamed from Boot/Source/Root/SplashScreen.fmt) | 0 | ||||
| -rw-r--r-- | Boot/Sources/compile_flags.txt (renamed from Boot/Source/compile_flags.txt) | 0 | ||||
| -rw-r--r-- | Boot/Sources/ovmf.ps1 (renamed from Boot/Source/ovmf.ps1) | 0 | ||||
| -rw-r--r-- | Boot/makefile | 20 | ||||
| -rw-r--r-- | Kernel/Sources/AppMain.cxx (renamed from Kernel/Source/AppMain.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Array.cxx (renamed from Kernel/Source/Array.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/ArrayList.cxx (renamed from Kernel/Source/ArrayList.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Atom.cxx (renamed from Kernel/Source/Atom.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/CodeManager.cxx (renamed from Kernel/Source/CodeManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Crc32.cxx (renamed from Kernel/Source/Crc32.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/CxxAbi.cxx (renamed from Kernel/Source/CxxAbi.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Defines.cxx (renamed from Kernel/Source/Defines.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/DeviceManager.cxx (renamed from Kernel/Source/DeviceManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/DriveManager.cxx (renamed from Kernel/Source/DriveManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/ErrorOr.cxx (renamed from Kernel/Source/ErrorOr.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/FS/NewFS.cxx (renamed from Kernel/Source/FS/NewFS.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/FileManager.cxx (renamed from Kernel/Source/FileManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Framebuffer.cxx (renamed from Kernel/Source/Framebuffer.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/GUIDWizard.cxx (renamed from Kernel/Source/GUIDWizard.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/GUIDWrapper.cxx (renamed from Kernel/Source/GUIDWrapper.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/HError.cxx (renamed from Kernel/Source/HError.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/IndexableProperty.cxx (renamed from Kernel/Source/IndexableProperty.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Json.cxx (renamed from Kernel/Source/Json.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/KernelCheck.cxx (renamed from Kernel/Source/KernelCheck.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/KernelHeap.cxx (renamed from Kernel/Source/KernelHeap.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/LockDelegate.cxx (renamed from Kernel/Source/LockDelegate.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/MutableArray.cxx (renamed from Kernel/Source/MutableArray.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Network/IP.cxx (renamed from Kernel/Source/Network/IP.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Network/IPCEP.cxx (renamed from Kernel/Source/Network/IPCEP.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Network/NetworkDevice.cxx (renamed from Kernel/Source/Network/NetworkDevice.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/New+Delete.cxx (renamed from Kernel/Source/New+Delete.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+FileManager.cxx (renamed from Kernel/Source/NewFS+FileManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+IO.cxx (renamed from Kernel/Source/NewFS+IO.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+Journal.cxx (renamed from Kernel/Source/NewFS+Journal.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/OwnPtr.cxx (renamed from Kernel/Source/OwnPtr.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PEFCodeManager.cxx (renamed from Kernel/Source/PEFCodeManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PEFSharedObjectRT.cxx (renamed from Kernel/Source/PEFSharedObjectRT.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PRDT.cxx (renamed from Kernel/Source/PRDT.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PageAllocator.cxx (renamed from Kernel/Source/PageAllocator.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PageManager.cxx (renamed from Kernel/Source/PageManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/PermissionSelector.cxx (renamed from Kernel/Source/PermissionSelector.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Pmm.cxx (renamed from Kernel/Source/Pmm.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx (renamed from Kernel/Source/ProcessScheduler.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessTeam.cxx (renamed from Kernel/Source/ProcessTeam.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Property.cxx (renamed from Kernel/Source/Property.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Ref.cxx (renamed from Kernel/Source/Ref.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/SMPManager.cxx (renamed from Kernel/Source/SMPManager.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Semaphore.cxx (renamed from Kernel/Source/Semaphore.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Storage/AHCIDeviceInterface.cxx (renamed from Kernel/Source/Storage/AHCIDeviceInterface.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Storage/ATADeviceInterface.cxx (renamed from Kernel/Source/Storage/ATADeviceInterface.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Storage/NVMEDeviceInterface.cxx (renamed from Kernel/Source/Storage/NVMEDeviceInterface.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Storage/SCSIDeviceInterface.cxx (renamed from Kernel/Source/Storage/SCSIDeviceInterface.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Stream.cxx (renamed from Kernel/Source/Stream.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/String.cxx (renamed from Kernel/Source/String.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/ThreadLocalStorage.cxx (renamed from Kernel/Source/ThreadLocalStorage.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Timer.cxx (renamed from Kernel/Source/Timer.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/URL.cxx (renamed from Kernel/Source/URL.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/UserHeap.cxx (renamed from Kernel/Source/UserHeap.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Utils.cxx (renamed from Kernel/Source/Utils.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/Variant.cxx (renamed from Kernel/Source/Variant.cxx) | 0 | ||||
| -rw-r--r-- | Kernel/Sources/compile_flags.txt (renamed from Kernel/Source/compile_flags.txt) | 0 | ||||
| -rw-r--r-- | Kernel/makefile | 6 | ||||
| -rw-r--r-- | SDK/Library/CoreCxxRuntime/Private.xml | 3 | ||||
| -rw-r--r-- | SDK/Library/CorePEFRuntime/Private.xml | 3 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/Alert.h | 2 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/Defines.h | 7 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/File.h | 16 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/Heap.h | 12 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/Intl.h | 9 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Headers/Transport.h | 29 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Private.xml | 4 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Sources/CRTStartup.c | 12 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Sources/File.c | 27 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/Sources/Heap.c | 9 | ||||
| -rw-r--r-- | SDK/Library/CoreSystem/amd64.mk | 2 |
95 files changed, 118 insertions, 43 deletions
diff --git a/Boot/Source/.gitkeep b/Boot/Sources/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Source/.gitkeep +++ b/Boot/Sources/.gitkeep diff --git a/Boot/Source/BootloaderRsrc.rsrc b/Boot/Sources/BootloaderRsrc.rsrc index 0282192b..0282192b 100644 --- a/Boot/Source/BootloaderRsrc.rsrc +++ b/Boot/Sources/BootloaderRsrc.rsrc diff --git a/Boot/Source/HEL/AMD64/.gitkeep b/Boot/Sources/HEL/AMD64/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Source/HEL/AMD64/.gitkeep +++ b/Boot/Sources/HEL/AMD64/.gitkeep diff --git a/Boot/Source/HEL/AMD64/BootAHCI.cxx b/Boot/Sources/HEL/AMD64/BootAHCI.cxx index d60b91fd..d60b91fd 100644 --- a/Boot/Source/HEL/AMD64/BootAHCI.cxx +++ b/Boot/Sources/HEL/AMD64/BootAHCI.cxx diff --git a/Boot/Source/HEL/AMD64/BootATA.cxx b/Boot/Sources/HEL/AMD64/BootATA.cxx index c82cb2ea..c82cb2ea 100644 --- a/Boot/Source/HEL/AMD64/BootATA.cxx +++ b/Boot/Sources/HEL/AMD64/BootATA.cxx diff --git a/Boot/Source/HEL/AMD64/BootFileReader.cxx b/Boot/Sources/HEL/AMD64/BootFileReader.cxx index 7ec6b7ab..7ec6b7ab 100644 --- a/Boot/Source/HEL/AMD64/BootFileReader.cxx +++ b/Boot/Sources/HEL/AMD64/BootFileReader.cxx diff --git a/Boot/Source/HEL/AMD64/BootJump.S b/Boot/Sources/HEL/AMD64/BootJump.S index af278cc7..af278cc7 100644 --- a/Boot/Source/HEL/AMD64/BootJump.S +++ b/Boot/Sources/HEL/AMD64/BootJump.S diff --git a/Boot/Source/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx index f58709be..f58709be 100644 --- a/Boot/Source/HEL/AMD64/BootMain.cxx +++ b/Boot/Sources/HEL/AMD64/BootMain.cxx diff --git a/Boot/Source/HEL/AMD64/BootPlatform.cxx b/Boot/Sources/HEL/AMD64/BootPlatform.cxx index 866c4839..866c4839 100644 --- a/Boot/Source/HEL/AMD64/BootPlatform.cxx +++ b/Boot/Sources/HEL/AMD64/BootPlatform.cxx diff --git a/Boot/Source/HEL/AMD64/BootString.cxx b/Boot/Sources/HEL/AMD64/BootString.cxx index 54ab2c64..54ab2c64 100644 --- a/Boot/Source/HEL/AMD64/BootString.cxx +++ b/Boot/Sources/HEL/AMD64/BootString.cxx diff --git a/Boot/Source/HEL/AMD64/BootTextWriter.cxx b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx index 90d12f3d..90d12f3d 100644 --- a/Boot/Source/HEL/AMD64/BootTextWriter.cxx +++ b/Boot/Sources/HEL/AMD64/BootTextWriter.cxx diff --git a/Boot/Source/HEL/AMD64/New+Delete.cxx b/Boot/Sources/HEL/AMD64/New+Delete.cxx index 6c025646..6c025646 100644 --- a/Boot/Source/HEL/AMD64/New+Delete.cxx +++ b/Boot/Sources/HEL/AMD64/New+Delete.cxx diff --git a/Boot/Source/HEL/AMD64/Support.cxx b/Boot/Sources/HEL/AMD64/Support.cxx index 22b01280..22b01280 100644 --- a/Boot/Source/HEL/AMD64/Support.cxx +++ b/Boot/Sources/HEL/AMD64/Support.cxx diff --git a/Boot/Source/HEL/AMD64/compile_flags.txt b/Boot/Sources/HEL/AMD64/compile_flags.txt index e4515efe..e4515efe 100644 --- a/Boot/Source/HEL/AMD64/compile_flags.txt +++ b/Boot/Sources/HEL/AMD64/compile_flags.txt diff --git a/Boot/Source/HEL/ARM64/.gitkeep b/Boot/Sources/HEL/ARM64/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Source/HEL/ARM64/.gitkeep +++ b/Boot/Sources/HEL/ARM64/.gitkeep diff --git a/Boot/Source/HEL/POWER/.gitkeep b/Boot/Sources/HEL/POWER/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Source/HEL/POWER/.gitkeep +++ b/Boot/Sources/HEL/POWER/.gitkeep diff --git a/Boot/Source/HEL/POWER/CoreBootStartup.S b/Boot/Sources/HEL/POWER/CoreBootStartup.S index f8ff99d7..f8ff99d7 100644 --- a/Boot/Source/HEL/POWER/CoreBootStartup.S +++ b/Boot/Sources/HEL/POWER/CoreBootStartup.S diff --git a/Boot/Source/HEL/RISCV/.gitkeep b/Boot/Sources/HEL/RISCV/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Source/HEL/RISCV/.gitkeep +++ b/Boot/Sources/HEL/RISCV/.gitkeep diff --git a/Boot/Source/HEL/RISCV/BootRISCV.S b/Boot/Sources/HEL/RISCV/BootRISCV.S index 7a7e7db0..7a7e7db0 100644 --- a/Boot/Source/HEL/RISCV/BootRISCV.S +++ b/Boot/Sources/HEL/RISCV/BootRISCV.S diff --git a/Boot/Source/Root/EFI/STARTUP.NSH b/Boot/Sources/Root/EFI/STARTUP.NSH index d29ba8fd..d29ba8fd 100644 --- a/Boot/Source/Root/EFI/STARTUP.NSH +++ b/Boot/Sources/Root/EFI/STARTUP.NSH diff --git a/Boot/Source/Root/SplashScreen.fmt b/Boot/Sources/Root/SplashScreen.fmt index 863d7b62..863d7b62 100644 --- a/Boot/Source/Root/SplashScreen.fmt +++ b/Boot/Sources/Root/SplashScreen.fmt diff --git a/Boot/Source/compile_flags.txt b/Boot/Sources/compile_flags.txt index c74d22b2..c74d22b2 100644 --- a/Boot/Source/compile_flags.txt +++ b/Boot/Sources/compile_flags.txt diff --git a/Boot/Source/ovmf.ps1 b/Boot/Sources/ovmf.ps1 index 5a2c5f0e..5a2c5f0e 100644 --- a/Boot/Source/ovmf.ps1 +++ b/Boot/Sources/ovmf.ps1 diff --git a/Boot/makefile b/Boot/makefile index 4b4ca293..63883321 100644 --- a/Boot/makefile +++ b/Boot/makefile @@ -27,10 +27,10 @@ IMG=epm.img IMG_2=epm-slave.img EMU_FLAGS=-net none -smp 4,sockets=1,cores=4,threads=1 -m 4G -M q35 \ - -bios Source/$(BIOS) -device piix3-ide,id=ide \ + -bios Sources/$(BIOS) -device piix3-ide,id=ide \ -drive id=disk,file=$(IMG),format=raw,if=none \ -device ide-hd,drive=disk,bus=ide.0 -drive \ - file=fat:rw:Source/Root,index=2,format=raw -d int -hdd $(IMG_2) + file=fat:rw:Sources/Root,index=2,format=raw -d int -hdd $(IMG_2) LD_FLAGS=-e Main --subsystem=10 @@ -59,11 +59,11 @@ invalid-recipe: .PHONY: all all: compile-amd64 - mkdir -p Source/Root/EFI/BOOT - $(LD_GNU) $(OBJ) $(LD_FLAGS) -o Source/$(BOOT_LOADER) - $(COPY) Source/$(BOOT_LOADER) Source/Root/EFI/BOOT/BOOTX64.EFI - $(COPY) Source/$(BOOT_LOADER) Source/Root/EFI/BOOT/NEWBOOT.EFI - $(COPY) ../Kernel/$(KERNEL) Source/Root/$(KERNEL) + mkdir -p Sources/Root/EFI/BOOT + $(LD_GNU) $(OBJ) $(LD_FLAGS) -o Sources/$(BOOT_LOADER) + $(COPY) Sources/$(BOOT_LOADER) Sources/Root/EFI/BOOT/BOOTX64.EFI + $(COPY) Sources/$(BOOT_LOADER) Sources/Root/EFI/BOOT/NEWBOOT.EFI + $(COPY) ../Kernel/$(KERNEL) Sources/Root/$(KERNEL) ifneq ($(DEBUG_SUPPORT), ) DEBUG = -D__DEBUG__ @@ -73,9 +73,9 @@ endif compile-amd64: $(RESCMD) $(CC_GNU) $(NEWOS_MODEL) $(STANDALONE_MACRO) $(FLAG_GNU) $(DEBUG) \ - $(wildcard Source/HEL/AMD64/*.cxx) \ - $(wildcard Source/HEL/AMD64/*.S) - $(wildcard Source/*.cxx) + $(wildcard Sources/HEL/AMD64/*.cxx) \ + $(wildcard Sources/HEL/AMD64/*.S) + $(wildcard Sources/*.cxx) .PHONY: run-efi-amd64 run-efi-amd64: diff --git a/Kernel/Source/AppMain.cxx b/Kernel/Sources/AppMain.cxx index e9da459b..e9da459b 100644 --- a/Kernel/Source/AppMain.cxx +++ b/Kernel/Sources/AppMain.cxx diff --git a/Kernel/Source/Array.cxx b/Kernel/Sources/Array.cxx index f1df0abe..f1df0abe 100644 --- a/Kernel/Source/Array.cxx +++ b/Kernel/Sources/Array.cxx diff --git a/Kernel/Source/ArrayList.cxx b/Kernel/Sources/ArrayList.cxx index e96e993c..e96e993c 100644 --- a/Kernel/Source/ArrayList.cxx +++ b/Kernel/Sources/ArrayList.cxx diff --git a/Kernel/Source/Atom.cxx b/Kernel/Sources/Atom.cxx index 0619e4ad..0619e4ad 100644 --- a/Kernel/Source/Atom.cxx +++ b/Kernel/Sources/Atom.cxx diff --git a/Kernel/Source/CodeManager.cxx b/Kernel/Sources/CodeManager.cxx index 358481f6..358481f6 100644 --- a/Kernel/Source/CodeManager.cxx +++ b/Kernel/Sources/CodeManager.cxx diff --git a/Kernel/Source/Crc32.cxx b/Kernel/Sources/Crc32.cxx index 2fd273e0..2fd273e0 100644 --- a/Kernel/Source/Crc32.cxx +++ b/Kernel/Sources/Crc32.cxx diff --git a/Kernel/Source/CxxAbi.cxx b/Kernel/Sources/CxxAbi.cxx index 9aea8db7..9aea8db7 100644 --- a/Kernel/Source/CxxAbi.cxx +++ b/Kernel/Sources/CxxAbi.cxx diff --git a/Kernel/Source/Defines.cxx b/Kernel/Sources/Defines.cxx index 919d0fe4..919d0fe4 100644 --- a/Kernel/Source/Defines.cxx +++ b/Kernel/Sources/Defines.cxx diff --git a/Kernel/Source/DeviceManager.cxx b/Kernel/Sources/DeviceManager.cxx index 5679b2af..5679b2af 100644 --- a/Kernel/Source/DeviceManager.cxx +++ b/Kernel/Sources/DeviceManager.cxx diff --git a/Kernel/Source/DriveManager.cxx b/Kernel/Sources/DriveManager.cxx index 62195b99..62195b99 100644 --- a/Kernel/Source/DriveManager.cxx +++ b/Kernel/Sources/DriveManager.cxx diff --git a/Kernel/Source/ErrorOr.cxx b/Kernel/Sources/ErrorOr.cxx index 10d6cc8f..10d6cc8f 100644 --- a/Kernel/Source/ErrorOr.cxx +++ b/Kernel/Sources/ErrorOr.cxx diff --git a/Kernel/Source/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index 6f19c8ed..6f19c8ed 100644 --- a/Kernel/Source/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx diff --git a/Kernel/Source/FileManager.cxx b/Kernel/Sources/FileManager.cxx index 1aeae426..1aeae426 100644 --- a/Kernel/Source/FileManager.cxx +++ b/Kernel/Sources/FileManager.cxx diff --git a/Kernel/Source/Framebuffer.cxx b/Kernel/Sources/Framebuffer.cxx index 5428ca91..5428ca91 100644 --- a/Kernel/Source/Framebuffer.cxx +++ b/Kernel/Sources/Framebuffer.cxx diff --git a/Kernel/Source/GUIDWizard.cxx b/Kernel/Sources/GUIDWizard.cxx index d434e497..d434e497 100644 --- a/Kernel/Source/GUIDWizard.cxx +++ b/Kernel/Sources/GUIDWizard.cxx diff --git a/Kernel/Source/GUIDWrapper.cxx b/Kernel/Sources/GUIDWrapper.cxx index b1f1d3cf..b1f1d3cf 100644 --- a/Kernel/Source/GUIDWrapper.cxx +++ b/Kernel/Sources/GUIDWrapper.cxx diff --git a/Kernel/Source/HError.cxx b/Kernel/Sources/HError.cxx index 8527a683..8527a683 100644 --- a/Kernel/Source/HError.cxx +++ b/Kernel/Sources/HError.cxx diff --git a/Kernel/Source/IndexableProperty.cxx b/Kernel/Sources/IndexableProperty.cxx index 16694f52..16694f52 100644 --- a/Kernel/Source/IndexableProperty.cxx +++ b/Kernel/Sources/IndexableProperty.cxx diff --git a/Kernel/Source/Json.cxx b/Kernel/Sources/Json.cxx index b0e4050f..b0e4050f 100644 --- a/Kernel/Source/Json.cxx +++ b/Kernel/Sources/Json.cxx diff --git a/Kernel/Source/KernelCheck.cxx b/Kernel/Sources/KernelCheck.cxx index b59417d4..b59417d4 100644 --- a/Kernel/Source/KernelCheck.cxx +++ b/Kernel/Sources/KernelCheck.cxx diff --git a/Kernel/Source/KernelHeap.cxx b/Kernel/Sources/KernelHeap.cxx index a8ca467e..a8ca467e 100644 --- a/Kernel/Source/KernelHeap.cxx +++ b/Kernel/Sources/KernelHeap.cxx diff --git a/Kernel/Source/LockDelegate.cxx b/Kernel/Sources/LockDelegate.cxx index c7e6234b..c7e6234b 100644 --- a/Kernel/Source/LockDelegate.cxx +++ b/Kernel/Sources/LockDelegate.cxx diff --git a/Kernel/Source/MutableArray.cxx b/Kernel/Sources/MutableArray.cxx index 195ca6d9..195ca6d9 100644 --- a/Kernel/Source/MutableArray.cxx +++ b/Kernel/Sources/MutableArray.cxx diff --git a/Kernel/Source/Network/IP.cxx b/Kernel/Sources/Network/IP.cxx index 1e438766..1e438766 100644 --- a/Kernel/Source/Network/IP.cxx +++ b/Kernel/Sources/Network/IP.cxx diff --git a/Kernel/Source/Network/IPCEP.cxx b/Kernel/Sources/Network/IPCEP.cxx index ba537e95..ba537e95 100644 --- a/Kernel/Source/Network/IPCEP.cxx +++ b/Kernel/Sources/Network/IPCEP.cxx diff --git a/Kernel/Source/Network/NetworkDevice.cxx b/Kernel/Sources/Network/NetworkDevice.cxx index 54d24b07..54d24b07 100644 --- a/Kernel/Source/Network/NetworkDevice.cxx +++ b/Kernel/Sources/Network/NetworkDevice.cxx diff --git a/Kernel/Source/New+Delete.cxx b/Kernel/Sources/New+Delete.cxx index d709aaee..d709aaee 100644 --- a/Kernel/Source/New+Delete.cxx +++ b/Kernel/Sources/New+Delete.cxx diff --git a/Kernel/Source/NewFS+FileManager.cxx b/Kernel/Sources/NewFS+FileManager.cxx index 3434edea..3434edea 100644 --- a/Kernel/Source/NewFS+FileManager.cxx +++ b/Kernel/Sources/NewFS+FileManager.cxx diff --git a/Kernel/Source/NewFS+IO.cxx b/Kernel/Sources/NewFS+IO.cxx index 5dfd77b0..5dfd77b0 100644 --- a/Kernel/Source/NewFS+IO.cxx +++ b/Kernel/Sources/NewFS+IO.cxx diff --git a/Kernel/Source/NewFS+Journal.cxx b/Kernel/Sources/NewFS+Journal.cxx index 57f76fd4..57f76fd4 100644 --- a/Kernel/Source/NewFS+Journal.cxx +++ b/Kernel/Sources/NewFS+Journal.cxx diff --git a/Kernel/Source/OwnPtr.cxx b/Kernel/Sources/OwnPtr.cxx index cfbdf3b9..cfbdf3b9 100644 --- a/Kernel/Source/OwnPtr.cxx +++ b/Kernel/Sources/OwnPtr.cxx diff --git a/Kernel/Source/PEFCodeManager.cxx b/Kernel/Sources/PEFCodeManager.cxx index 6fa7e6a1..6fa7e6a1 100644 --- a/Kernel/Source/PEFCodeManager.cxx +++ b/Kernel/Sources/PEFCodeManager.cxx diff --git a/Kernel/Source/PEFSharedObjectRT.cxx b/Kernel/Sources/PEFSharedObjectRT.cxx index 20af1b98..20af1b98 100644 --- a/Kernel/Source/PEFSharedObjectRT.cxx +++ b/Kernel/Sources/PEFSharedObjectRT.cxx diff --git a/Kernel/Source/PRDT.cxx b/Kernel/Sources/PRDT.cxx index 11165a40..11165a40 100644 --- a/Kernel/Source/PRDT.cxx +++ b/Kernel/Sources/PRDT.cxx diff --git a/Kernel/Source/PageAllocator.cxx b/Kernel/Sources/PageAllocator.cxx index d3a4d4e2..d3a4d4e2 100644 --- a/Kernel/Source/PageAllocator.cxx +++ b/Kernel/Sources/PageAllocator.cxx diff --git a/Kernel/Source/PageManager.cxx b/Kernel/Sources/PageManager.cxx index 990b2546..990b2546 100644 --- a/Kernel/Source/PageManager.cxx +++ b/Kernel/Sources/PageManager.cxx diff --git a/Kernel/Source/PermissionSelector.cxx b/Kernel/Sources/PermissionSelector.cxx index cb44b237..cb44b237 100644 --- a/Kernel/Source/PermissionSelector.cxx +++ b/Kernel/Sources/PermissionSelector.cxx diff --git a/Kernel/Source/Pmm.cxx b/Kernel/Sources/Pmm.cxx index 0641f457..0641f457 100644 --- a/Kernel/Source/Pmm.cxx +++ b/Kernel/Sources/Pmm.cxx diff --git a/Kernel/Source/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 1e4537f1..1e4537f1 100644 --- a/Kernel/Source/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx diff --git a/Kernel/Source/ProcessTeam.cxx b/Kernel/Sources/ProcessTeam.cxx index 7e311399..7e311399 100644 --- a/Kernel/Source/ProcessTeam.cxx +++ b/Kernel/Sources/ProcessTeam.cxx diff --git a/Kernel/Source/Property.cxx b/Kernel/Sources/Property.cxx index 0c5c5fab..0c5c5fab 100644 --- a/Kernel/Source/Property.cxx +++ b/Kernel/Sources/Property.cxx diff --git a/Kernel/Source/Ref.cxx b/Kernel/Sources/Ref.cxx index 01883e07..01883e07 100644 --- a/Kernel/Source/Ref.cxx +++ b/Kernel/Sources/Ref.cxx diff --git a/Kernel/Source/SMPManager.cxx b/Kernel/Sources/SMPManager.cxx index 90a9d440..90a9d440 100644 --- a/Kernel/Source/SMPManager.cxx +++ b/Kernel/Sources/SMPManager.cxx diff --git a/Kernel/Source/Semaphore.cxx b/Kernel/Sources/Semaphore.cxx index 7bd1d513..7bd1d513 100644 --- a/Kernel/Source/Semaphore.cxx +++ b/Kernel/Sources/Semaphore.cxx diff --git a/Kernel/Source/Storage/AHCIDeviceInterface.cxx b/Kernel/Sources/Storage/AHCIDeviceInterface.cxx index b0431cb1..b0431cb1 100644 --- a/Kernel/Source/Storage/AHCIDeviceInterface.cxx +++ b/Kernel/Sources/Storage/AHCIDeviceInterface.cxx diff --git a/Kernel/Source/Storage/ATADeviceInterface.cxx b/Kernel/Sources/Storage/ATADeviceInterface.cxx index 0f7d22c1..0f7d22c1 100644 --- a/Kernel/Source/Storage/ATADeviceInterface.cxx +++ b/Kernel/Sources/Storage/ATADeviceInterface.cxx diff --git a/Kernel/Source/Storage/NVMEDeviceInterface.cxx b/Kernel/Sources/Storage/NVMEDeviceInterface.cxx index 22c9c9d0..22c9c9d0 100644 --- a/Kernel/Source/Storage/NVMEDeviceInterface.cxx +++ b/Kernel/Sources/Storage/NVMEDeviceInterface.cxx diff --git a/Kernel/Source/Storage/SCSIDeviceInterface.cxx b/Kernel/Sources/Storage/SCSIDeviceInterface.cxx index b64681d3..b64681d3 100644 --- a/Kernel/Source/Storage/SCSIDeviceInterface.cxx +++ b/Kernel/Sources/Storage/SCSIDeviceInterface.cxx diff --git a/Kernel/Source/Stream.cxx b/Kernel/Sources/Stream.cxx index f21ef4d7..f21ef4d7 100644 --- a/Kernel/Source/Stream.cxx +++ b/Kernel/Sources/Stream.cxx diff --git a/Kernel/Source/String.cxx b/Kernel/Sources/String.cxx index 4b6ea365..4b6ea365 100644 --- a/Kernel/Source/String.cxx +++ b/Kernel/Sources/String.cxx diff --git a/Kernel/Source/ThreadLocalStorage.cxx b/Kernel/Sources/ThreadLocalStorage.cxx index c31ae1c2..c31ae1c2 100644 --- a/Kernel/Source/ThreadLocalStorage.cxx +++ b/Kernel/Sources/ThreadLocalStorage.cxx diff --git a/Kernel/Source/Timer.cxx b/Kernel/Sources/Timer.cxx index 0495677c..0495677c 100644 --- a/Kernel/Source/Timer.cxx +++ b/Kernel/Sources/Timer.cxx diff --git a/Kernel/Source/URL.cxx b/Kernel/Sources/URL.cxx index 1b223938..1b223938 100644 --- a/Kernel/Source/URL.cxx +++ b/Kernel/Sources/URL.cxx diff --git a/Kernel/Source/UserHeap.cxx b/Kernel/Sources/UserHeap.cxx index 02c4c753..02c4c753 100644 --- a/Kernel/Source/UserHeap.cxx +++ b/Kernel/Sources/UserHeap.cxx diff --git a/Kernel/Source/Utils.cxx b/Kernel/Sources/Utils.cxx index 1814c72e..1814c72e 100644 --- a/Kernel/Source/Utils.cxx +++ b/Kernel/Sources/Utils.cxx diff --git a/Kernel/Source/Variant.cxx b/Kernel/Sources/Variant.cxx index 94f1991e..94f1991e 100644 --- a/Kernel/Source/Variant.cxx +++ b/Kernel/Sources/Variant.cxx diff --git a/Kernel/Source/compile_flags.txt b/Kernel/Sources/compile_flags.txt index 1f54e6fb..1f54e6fb 100644 --- a/Kernel/Source/compile_flags.txt +++ b/Kernel/Sources/compile_flags.txt diff --git a/Kernel/makefile b/Kernel/makefile index 24c823b4..b7749100 100644 --- a/Kernel/makefile +++ b/Kernel/makefile @@ -50,9 +50,9 @@ WINDRES=x86_64-w64-mingw32-windres .PHONY: newos-amd64-epm newos-amd64-epm: clean $(WINDRES) KernelRsrc.rsrc -O coff -o KernelRsrc.obj - $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Source/*.cxx) \ - $(wildcard Source/FS/*.cxx) $(wildcard HALKit/AMD64/Storage/*.cxx) \ - $(wildcard HALKit/AMD64/PCI/*.cxx) $(wildcard Source/Network/*.cxx) $(wildcard Source/Storage/*.cxx) \ + $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Sources/*.cxx) \ + $(wildcard Sources/FS/*.cxx) $(wildcard HALKit/AMD64/Storage/*.cxx) \ + $(wildcard HALKit/AMD64/PCI/*.cxx) $(wildcard Sources/Network/*.cxx) $(wildcard Sources/Storage/*.cxx) \ $(wildcard HALKit/AMD64/*.cxx) $(wildcard HALKit/AMD64/*.cpp) \ $(wildcard HALKit/AMD64/*.s) $(ASM) $(ASMFLAGS) HALKit/AMD64/HalInterruptAPI.asm diff --git a/SDK/Library/CoreCxxRuntime/Private.xml b/SDK/Library/CoreCxxRuntime/Private.xml new file mode 100644 index 00000000..08a95273 --- /dev/null +++ b/SDK/Library/CoreCxxRuntime/Private.xml @@ -0,0 +1,3 @@ +<Private> + <Ignore/> +</Private>
\ No newline at end of file diff --git a/SDK/Library/CorePEFRuntime/Private.xml b/SDK/Library/CorePEFRuntime/Private.xml new file mode 100644 index 00000000..08a95273 --- /dev/null +++ b/SDK/Library/CorePEFRuntime/Private.xml @@ -0,0 +1,3 @@ +<Private> + <Ignore/> +</Private>
\ No newline at end of file diff --git a/SDK/Library/CoreSystem/Headers/Alert.h b/SDK/Library/CoreSystem/Headers/Alert.h index a09a5d57..7decd4ca 100644 --- a/SDK/Library/CoreSystem/Headers/Alert.h +++ b/SDK/Library/CoreSystem/Headers/Alert.h @@ -22,4 +22,4 @@ /// @param fmt The alert formating. /// @param /// @return -CS_EXTERN_C VoidType Alert(const CharacterTypeUTF8* fmt, ...); +CS_EXTERN_C VoidType UiAlert(const CharacterTypeUTF8* fmt, ...); diff --git a/SDK/Library/CoreSystem/Headers/Defines.h b/SDK/Library/CoreSystem/Headers/Defines.h index 1b6a27c6..a7e46234 100644 --- a/SDK/Library/CoreSystem/Headers/Defines.h +++ b/SDK/Library/CoreSystem/Headers/Defines.h @@ -15,7 +15,7 @@ { \ if (!e) \ { \ - Alert("Sorry, an assertion failed.\nFile: %s\nLine: %i", __FILE__, __LINE__) RtAssertTriggerInterrupt() \ + UiAlert("Assertion failed.\nExpression :%s\nFile: %s\nLine: %i", #e, __FILE__, __LINE__) RtAssertTriggerInterrupt() \ } \ } #else @@ -144,6 +144,11 @@ enum RtProcessCall kCallRandomNumberGenerator, kCallGetArgsCount, kCallGetArgsPtr, + kCallFileExists, + kCallDirectoryExists, + kCallSymlinkExists, + kCallDeviceExists, + kCallDriveExists, /// @brief Number of process calls. kCallsCount, }; diff --git a/SDK/Library/CoreSystem/Headers/File.h b/SDK/Library/CoreSystem/Headers/File.h index da88ecbc..594b4edb 100644 --- a/SDK/Library/CoreSystem/Headers/File.h +++ b/SDK/Library/CoreSystem/Headers/File.h @@ -8,6 +8,8 @@ #include <Headers/Defines.h> +struct _Fork; + /// @brief Filesystem wrapper. typedef QWordType FSRef; @@ -16,14 +18,14 @@ typedef QWordType FSRef; /// @param path where to find it. /// @param rest the restrict (rw, rwe, r+, w+, r, w) /// @return FSRef the file. -CS_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* r); +CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* r); /// @brief Closes the file and flushes it to the said file. -/// @param refFs the filesystem reference. +/// @param refCS the filesystem reference. /// @return -CS_EXTERN_C VoidType FsCloseFile(FSRef refFs); +CS_EXTERN_C VoidType CSCloseFile(FSRef refCS); -#define kMaxForkNameLength 256 /* long fork names. */ +#define kMaxForkNameLength (256U) /* long fork names. */ /// @brief A fork information header. typedef struct _Fork @@ -38,13 +40,13 @@ typedef struct _Fork typedef ForkType* FSForkRef; /// @brief Gets the fork inside a file. -/// @param refFs the filesystem ref +/// @param refCS the filesystem ref /// @param forkName the fork's name /// @return the fork data. -CS_EXTERN_C FSForkRef FsGetFork(FSRef refFs, const CharacterTypeUTF8* forkName); +CS_EXTERN_C FSForkRef CSGetFork(FSRef refCS, const CharacterTypeUTF8* forkName); /// @brief Check if the filesystem path is valid. /// @return if not return false, or true. -CS_EXTERN_C BooleanType FsIsValidPath(const CharacterTypeUTF8* path); +CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path); /// END OF FILE diff --git a/SDK/Library/CoreSystem/Headers/Heap.h b/SDK/Library/CoreSystem/Headers/Heap.h index 87b356e2..b2ad6e74 100644 --- a/SDK/Library/CoreSystem/Headers/Heap.h +++ b/SDK/Library/CoreSystem/Headers/Heap.h @@ -8,9 +8,9 @@ #include <Headers/Defines.h> -#define kAllocationKindCount (2) +#define cAllocationKindCount (2U) -enum RtAllocationKind +enum CsAllocationKind { kStandardAllocation = 0xC, kArrayAllocation = 0xD, @@ -20,20 +20,20 @@ enum RtAllocationKind /// @param sz the size /// @param flags the allocation flags. /// @return -CS_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, +CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz, DWordType flags); /// @brief Check if the pointer exists. /// @param ptr the pointer to free. /// @return -CS_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr); +CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr); /// @brief Gets the size of the process' pointer. /// @param ptr the pointer to free. /// @return -CS_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr); +CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr); /// @brief Frees the process pointer. /// @param ptr the pointer to free. /// @return -CS_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr); +CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr); diff --git a/SDK/Library/CoreSystem/Headers/Intl.h b/SDK/Library/CoreSystem/Headers/Intl.h index 9a06fdfe..b868adca 100644 --- a/SDK/Library/CoreSystem/Headers/Intl.h +++ b/SDK/Library/CoreSystem/Headers/Intl.h @@ -12,9 +12,14 @@ typedef UInt64Type IntlRef; -/// @brief locale getter and setters. - +/// @brief Get app locale. +/// @param name locale name. +/// @return IntlRef IntlGetLocale(const char* name); + +/// @brief Set app locale. +/// @param intl the locale +/// @return BooleanType IntlSetLocale(const IntlRef intl); /// @brief locale helpers. diff --git a/SDK/Library/CoreSystem/Headers/Transport.h b/SDK/Library/CoreSystem/Headers/Transport.h index aed20e96..3f6db3f1 100644 --- a/SDK/Library/CoreSystem/Headers/Transport.h +++ b/SDK/Library/CoreSystem/Headers/Transport.h @@ -16,6 +16,33 @@ #include <Headers/Defines.h> -typedef QWordType CSStreamType; +typedef QWordType TrStreamType; + +/// @brief Opens a new socket +/// @param afType address family +/// @param sockType type of socket +/// @param sockProto socket protocol. +/// @return The STREAMS socket. +/// @note return is const. +CS_EXTERN_C CS_CONST TrStreamType CSOpenSocket(UInt32Type afType, UInt32Type sockType, UInt32Type sockProto); + +/// @brief Close a STREAMS socket. +/// @param streams The streams socket. +/// @return +CS_EXTERN_C VoidType CSCloseSocket(CS_CONST TrStreamType streams); + +/// @brief Get OpenTransport version. +/// @param void +/// @return +CS_EXTERN_C CS_CONST Int32Type CSGetVersion(VoidType); + +enum +{ + TrSocketProtoTCP, /// TCP socket + TrSocketProtoUDP, /// UDP socket + TrSocketProtoUN, /// IPC socket + TrSocketProtoRaw, /// Raw socket + TrSocketProtoCount, +}; #endif // __TRANSPORT__
\ No newline at end of file diff --git a/SDK/Library/CoreSystem/Private.xml b/SDK/Library/CoreSystem/Private.xml new file mode 100644 index 00000000..55b0ba71 --- /dev/null +++ b/SDK/Library/CoreSystem/Private.xml @@ -0,0 +1,4 @@ +<Private> + <File name="Headers/Hint.h" hidden="true"/> + <Directory name="Sources/" hidden="true"/> +</Private>
\ No newline at end of file diff --git a/SDK/Library/CoreSystem/Sources/CRTStartup.c b/SDK/Library/CoreSystem/Sources/CRTStartup.c new file mode 100644 index 00000000..1cfad65d --- /dev/null +++ b/SDK/Library/CoreSystem/Sources/CRTStartup.c @@ -0,0 +1,12 @@ +/* ------------------------------------------- + + Copyright SoftwareLabs + +------------------------------------------- */ + +#include <Headers/Defines.h> + +VoidType __DllMainCRTStartup(VoidType) +{ + kSharedApplication = RtGetAppPointer(); +}
\ No newline at end of file diff --git a/SDK/Library/CoreSystem/Sources/File.c b/SDK/Library/CoreSystem/Sources/File.c index 485500ab..7547e7f2 100644 --- a/SDK/Library/CoreSystem/Sources/File.c +++ b/SDK/Library/CoreSystem/Sources/File.c @@ -20,11 +20,11 @@ enum FileOp /// @param path where to find it. /// @param rest the restrict (rw, rwe, r+, w+, r, w) /// @return FSRef the file. -CS_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, +CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* rest) { CS_MUST_PASS(kSharedApplication); - CS_MUST_PASS(path && FsIsValidPath(path) == Yes); + CS_MUST_PASS(path && CSIsValidPath(path) == Yes); CS_MUST_PASS(rest); return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path, @@ -32,12 +32,27 @@ CS_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, } /// @brief Closes the file and flushes it to the said file. -/// @param refFs the filesystem reference. +/// @param refCS the filesystem reference. /// @return -CS_EXTERN_C VoidType FsCloseFile(FSRef refFs) +CS_EXTERN_C VoidType CSCloseFile(FSRef refCS) { CS_MUST_PASS(kSharedApplication); - kSharedApplication->Invoke(kSharedApplication, refFs, kFlushFile); - kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refFs); + kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile); + kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS); } + +/// @brief Check if filesystem path is valid. +/// @param path +/// @return +CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path) +{ + CS_MUST_PASS(kSharedApplication); + CS_MUST_PASS(path); + + return kSharedApplication->Invoke(kSharedApplication, kCallFileExists, path) || + kSharedApplication->Invoke(kSharedApplication, kCallDirectoryExists, path) || + kSharedApplication->Invoke(kSharedApplication, kCallSymlinkExists, path) || + kSharedApplication->Invoke(kSharedApplication, kCallDriveExists, path) || + kSharedApplication->Invoke(kSharedApplication, kCallDeviceExists, path); +}
\ No newline at end of file diff --git a/SDK/Library/CoreSystem/Sources/Heap.c b/SDK/Library/CoreSystem/Sources/Heap.c index e359aded..e7a77ba5 100644 --- a/SDK/Library/CoreSystem/Sources/Heap.c +++ b/SDK/Library/CoreSystem/Sources/Heap.c @@ -11,7 +11,7 @@ /// @param sz size of object. /// @param flags flags. /// @return -CS_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, DWordType flags) +CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz, DWordType flags) { CS_MUST_PASS(kSharedApplication); CS_MUST_PASS(sz); @@ -23,7 +23,7 @@ CS_EXTERN_C PtrVoidType RtHeapAllocate(QWordType sz, DWordType flags) /// @brief Free pointer from the user's heap. /// @param ptr the pointer to free. -CS_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr) +CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr) { CS_MUST_PASS(kSharedApplication); CS_MUST_PASS(ptr); @@ -35,7 +35,7 @@ CS_EXTERN_C VoidType RtHeapFree(PtrVoidType ptr) /// @brief Get pointer size. /// @param ptr the pointer to find. /// @return the size. -CS_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr) +CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr) { CS_MUST_PASS(kSharedApplication); @@ -46,10 +46,9 @@ CS_EXTERN_C QWordType RtHeapGetSize(PtrVoidType ptr) /// @brief Check if the pointer exists. /// @param ptr the pointer to check. /// @return if it exists -CS_EXTERN_C BooleanType RtHeapPtrExists(PtrVoidType ptr) +CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr) { CS_MUST_PASS(kSharedApplication); - CS_MUST_PASS(ptr); return kSharedApplication->Invoke(kSharedApplication, kCallCheckPtr, ptr); } diff --git a/SDK/Library/CoreSystem/amd64.mk b/SDK/Library/CoreSystem/amd64.mk index 33303430..e64de90f 100644 --- a/SDK/Library/CoreSystem/amd64.mk +++ b/SDK/Library/CoreSystem/amd64.mk @@ -6,7 +6,7 @@ CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CCINC=-I./ -CCFLAGS=-D__SINGLE_PRECISION__ -nostdlib -std=c17 -ffreestanding -Xlinker --subsystem=17 -shared +CCFLAGS=-D__SINGLE_PRECISION__ -nostdlib -std=c17 -ffreestanding -Xlinker --subsystem=17 -e __DllMainCRTStartup -shared OUTPUT=CoreSystem.lib .PHONY: all |
