From 9e1e06c64bf3d3439dcf05369e689273fa540e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=97=B1=20PixelyIon?= Date: Thu, 5 Sep 2019 18:12:19 +0530 Subject: [PATCH] Milestone 1 - Processes & Threads Reworks the API a fair bit and adds documentation to almost everything. --- .gitignore | 9 +- .idea/codeStyles/Project.xml | 110 +++++++ .idea/discord.xml | 6 + .idea/misc.xml | 4 + README.md | 6 +- app/CMakeLists.txt | 18 +- app/build.gradle | 4 +- app/src/main/cpp/lightswitch.cpp | 39 ++- app/src/main/cpp/switch/common.cpp | 60 ++-- app/src/main/cpp/switch/common.h | 259 +++++++++++++-- app/src/main/cpp/switch/constant.h | 73 ----- app/src/main/cpp/switch/device.h | 27 -- app/src/main/cpp/switch/hw/cpu.cpp | 120 ------- app/src/main/cpp/switch/hw/cpu.h | 54 ---- app/src/main/cpp/switch/hw/memory.cpp | 56 ---- app/src/main/cpp/switch/hw/memory.h | 38 --- app/src/main/cpp/switch/kernel/ipc.cpp | 102 ++++++ app/src/main/cpp/switch/kernel/ipc.h | 69 ++++ app/src/main/cpp/switch/kernel/service.cpp | 7 + app/src/main/cpp/switch/kernel/service.h | 9 + .../cpp/switch/kernel/services/BaseService.h | 8 + app/src/main/cpp/switch/kernel/svc.cpp | 136 ++++++++ app/src/main/cpp/switch/{os => kernel}/svc.h | 99 ++++-- .../main/cpp/switch/kernel/types/KObject.h | 15 + .../main/cpp/switch/kernel/types/KProcess.cpp | 193 ++++++++++++ .../main/cpp/switch/kernel/types/KProcess.h | 191 ++++++++++++ .../main/cpp/switch/kernel/types/KThread.cpp | 26 ++ .../main/cpp/switch/kernel/types/KThread.h | 53 ++++ app/src/main/cpp/switch/loader/loader.h | 22 +- app/src/main/cpp/switch/loader/nro.cpp | 53 ++-- app/src/main/cpp/switch/loader/nro.h | 14 +- app/src/main/cpp/switch/nce.cpp | 294 ++++++++++++++++++ app/src/main/cpp/switch/nce.h | 202 ++++++++++++ app/src/main/cpp/switch/os.cpp | 91 ++++++ app/src/main/cpp/switch/os.h | 61 ++++ app/src/main/cpp/switch/os/ipc.cpp | 31 -- app/src/main/cpp/switch/os/ipc.h | 29 -- app/src/main/cpp/switch/os/os.cpp | 22 -- app/src/main/cpp/switch/os/os.h | 32 -- app/src/main/cpp/switch/os/svc.cpp | 66 ---- .../java/emu/lightswitch/LogActivity.java | 4 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 3 +- 43 files changed, 2029 insertions(+), 688 deletions(-) delete mode 100644 app/src/main/cpp/switch/constant.h delete mode 100644 app/src/main/cpp/switch/device.h delete mode 100644 app/src/main/cpp/switch/hw/cpu.cpp delete mode 100644 app/src/main/cpp/switch/hw/cpu.h delete mode 100644 app/src/main/cpp/switch/hw/memory.cpp delete mode 100644 app/src/main/cpp/switch/hw/memory.h create mode 100644 app/src/main/cpp/switch/kernel/ipc.cpp create mode 100644 app/src/main/cpp/switch/kernel/ipc.h create mode 100644 app/src/main/cpp/switch/kernel/service.cpp create mode 100644 app/src/main/cpp/switch/kernel/service.h create mode 100644 app/src/main/cpp/switch/kernel/services/BaseService.h create mode 100644 app/src/main/cpp/switch/kernel/svc.cpp rename app/src/main/cpp/switch/{os => kernel}/svc.h (71%) create mode 100644 app/src/main/cpp/switch/kernel/types/KObject.h create mode 100644 app/src/main/cpp/switch/kernel/types/KProcess.cpp create mode 100644 app/src/main/cpp/switch/kernel/types/KProcess.h create mode 100644 app/src/main/cpp/switch/kernel/types/KThread.cpp create mode 100644 app/src/main/cpp/switch/kernel/types/KThread.h create mode 100644 app/src/main/cpp/switch/nce.cpp create mode 100644 app/src/main/cpp/switch/nce.h create mode 100644 app/src/main/cpp/switch/os.cpp create mode 100644 app/src/main/cpp/switch/os.h delete mode 100644 app/src/main/cpp/switch/os/ipc.cpp delete mode 100644 app/src/main/cpp/switch/os/ipc.h delete mode 100644 app/src/main/cpp/switch/os/os.cpp delete mode 100644 app/src/main/cpp/switch/os/os.h delete mode 100644 app/src/main/cpp/switch/os/svc.cpp diff --git a/.gitignore b/.gitignore index 225e5d86..687392f0 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,11 @@ fabric.properties .idea/caches/build_file_checksums.ser # Android Studio captures folder -captures/ \ No newline at end of file +captures/ + +# VSCode +.vscode/ + +# Android Studio +.cxx/ + diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index b522fcfe..a952188a 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -14,6 +14,7 @@ + @@ -30,5 +31,114 @@