diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 17:06:30 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 17:06:30 +0100 |
| commit | 2f7c48ef9172ba48fa177600a12ab0d51cb9e566 (patch) | |
| tree | 96841cb24ca8756b1bc30ea50f9664245a3479fb /Private | |
| parent | b340547eb2d6db9eddd8bdbf0e473f9fe993bec4 (diff) | |
Kernel: Fix ABI for MP-CC, rename FilesystemIndexer to
IndexableProperty.
Public/ZipKit: Add impl for deflate/inflate.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/FSKit/IndexableProperty.hxx (renamed from Private/FSKit/FilesystemIndexer.hxx) | 0 | ||||
| -rw-r--r-- | Private/FSKit/NewFS.hxx | 2 | ||||
| -rw-r--r-- | Private/FSKit/NewFSIndexer.hxx | 2 | ||||
| -rw-r--r-- | Private/KernelKit/Device.hpp | 9 | ||||
| -rw-r--r-- | Private/Source/CxxAbi.cxx | 45 | ||||
| -rw-r--r-- | Private/Source/IndexableProperty.cxx | 2 |
6 files changed, 40 insertions, 20 deletions
diff --git a/Private/FSKit/FilesystemIndexer.hxx b/Private/FSKit/IndexableProperty.hxx index 4ba68056..4ba68056 100644 --- a/Private/FSKit/FilesystemIndexer.hxx +++ b/Private/FSKit/IndexableProperty.hxx diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx index f9725e22..0e935cd5 100644 --- a/Private/FSKit/NewFS.hxx +++ b/Private/FSKit/NewFS.hxx @@ -175,7 +175,7 @@ namespace hCore virtual bool WriteCatalog(NewCatalog& catalog, voidPtr data) = 0; virtual bool RemoveCatalog(NewCatalog& catalog) = 0; - void FormatDrive(DriveTraits& drive); + virtual bool Format(DriveTraits& drive) = 0; }; diff --git a/Private/FSKit/NewFSIndexer.hxx b/Private/FSKit/NewFSIndexer.hxx index fd22e4bd..c5f63059 100644 --- a/Private/FSKit/NewFSIndexer.hxx +++ b/Private/FSKit/NewFSIndexer.hxx @@ -9,7 +9,7 @@ #pragma once -#include <FSKit/FilesystemIndexer.hxx> +#include <FSKit/IndexableProperty.hxx> #include <NewKit/MutableArray.hpp> namespace hCore diff --git a/Private/KernelKit/Device.hpp b/Private/KernelKit/Device.hpp index b117cf7f..4ae968c2 100644 --- a/Private/KernelKit/Device.hpp +++ b/Private/KernelKit/Device.hpp @@ -35,22 +35,19 @@ namespace hCore DeviceInterface(const DeviceInterface<T> &) = default; public: - DeviceInterface<T> &operator<<(T Data) + DeviceInterface<T>& operator<<(T Data) { m_Out(Data); return *this; } - DeviceInterface<T> &operator>>(T Data) + DeviceInterface<T>& operator>>(T Data) { m_In(Data); return *this; } - virtual const char* Name() const - { - return ("DeviceInterface"); - } + virtual const char* Name() const { return "DeviceInterface"; } operator bool() { return m_Out && m_In; } bool operator!() { return !m_Out && !m_In; } diff --git a/Private/Source/CxxAbi.cxx b/Private/Source/CxxAbi.cxx index 324c878d..4984c81a 100644 --- a/Private/Source/CxxAbi.cxx +++ b/Private/Source/CxxAbi.cxx @@ -29,7 +29,8 @@ extern "C" void __stack_chk_fail() hCore::panic(RUNTIME_CHECK_POINTER); } -extern "C" int __cxa_atexit(void (*f)(void *), void *arg, void *dso) { +extern "C" int __cxa_atexit(void (*f)(void *), void *arg, void *dso) +{ if (__atexit_func_count >= DSO_MAX_OBJECTS) return -1; @@ -42,11 +43,15 @@ extern "C" int __cxa_atexit(void (*f)(void *), void *arg, void *dso) { return 0; } -extern "C" void __cxa_finalize(void *f) { +extern "C" void __cxa_finalize(void *f) +{ uarch_t i = __atexit_func_count; - if (!f) { - while (i--) { - if (__atexit_funcs[i].destructor_func) { + if (!f) + { + while (i--) + { + if (__atexit_funcs[i].destructor_func) + { (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr); }; } @@ -54,26 +59,32 @@ extern "C" void __cxa_finalize(void *f) { return; } - while (i--) { - if (__atexit_funcs[i].destructor_func) { + while (i--) + { + if (__atexit_funcs[i].destructor_func) + { (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr); __atexit_funcs[i].destructor_func = 0; }; } } -namespace cxxabiv1 { - extern "C" int __cxa_guard_acquire(__guard *g) { +namespace cxxabiv1 +{ + extern "C" int __cxa_guard_acquire(__guard *g) + { (void) g; return 0; } - extern "C" int __cxa_guard_release(__guard *g) { + extern "C" int __cxa_guard_release(__guard *g) + { *(char *) g = 1; return 0; } - extern "C" void __cxa_guard_abort(__guard *g) { + extern "C" void __cxa_guard_abort(__guard *g) + { (void) g; } } // namespace cxxabiv1 @@ -87,6 +98,18 @@ namespace cxxkit for (int i = 0; i < cnt; ++i) (finis[i])(); } + + extern "C" void __init_local(void(**init)(void), int cnt) + { + for (int i = 0; i < cnt; ++i) + (init[i])(); + } + + extern "C" void __fini_local(void(**finis)(void), int cnt) + { + for (int i = 0; i < cnt; ++i) + (finis[i])(); + } } #endif diff --git a/Private/Source/IndexableProperty.cxx b/Private/Source/IndexableProperty.cxx index bb1393b5..5b49d6c1 100644 --- a/Private/Source/IndexableProperty.cxx +++ b/Private/Source/IndexableProperty.cxx @@ -9,7 +9,7 @@ //! @brief hCore NewFS Indexer. -#include <FSKit/FilesystemIndexer.hxx> +#include <FSKit/IndexableProperty.hxx> #include <CompilerKit/Compiler.hpp> #include <NewKit/MutableArray.hpp> #include <NewKit/Utils.hpp> |
