diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-09-04 10:15:05 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-09-04 10:15:05 +0200 |
| commit | be11411ae7c2f6a2eda84abf56521d38a8b80b7e (patch) | |
| tree | e42a87f76dee6a123ba02f2014f563464af93ba9 /public | |
| parent | ce27bc968ba425eaa7f27091b704b6519b4b978b (diff) | |
feat&fix: Kernel improvements and fixes, introduced `special` trees.
fix: Protective measures against affinity `zero` processes.
wip: WIP introduce `CFDictionary` object inside CF.
fix: public tooling fixes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public')
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/headers/Array.h | 2 | ||||
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h | 40 | ||||
| -rw-r--r-- | public/tools/diutil/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/ld.dyn/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/ld.fwrk/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/dist/.keep | 0 | ||||
| -rw-r--r-- | public/tools/mk.fwrk/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/mk.hefs/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/mk.nefs/dist/.touch | 0 | ||||
| -rw-r--r-- | public/tools/ping/dist/.touch | 0 |
10 files changed, 41 insertions, 1 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Array.h b/public/frameworks/CoreFoundation.fwrk/headers/Array.h index d9c528d9..81f5f064 100644 --- a/public/frameworks/CoreFoundation.fwrk/headers/Array.h +++ b/public/frameworks/CoreFoundation.fwrk/headers/Array.h @@ -46,7 +46,7 @@ class CFArray final { }; template <typename ValueType> -auto make_array(ValueType val) { +inline auto make_array(ValueType val) { return CFArray<ValueType, ARRAY_SIZE(val)>{val}; } } // namespace CF diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h new file mode 100644 index 00000000..87496c73 --- /dev/null +++ b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h @@ -0,0 +1,40 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include <libSystem/SystemKit/System.h> + +namespace CF { +template <typename Key, typename Value> +class CFDictionary final { + public: + explicit CFDictionary() = default; + ~CFDictionary() = default; + + CFDictionary& operator=(const CFDictionary&) = default; + CFDictionary(const CFDictionary&) = default; + + Value& operator[](Key& at) { + MUST_PASS(this->Find(at)); + return fArray[at]; + } + + Bool Empty() { return this->fCount > 0; } + + Bool Find(Key& key) { return No; } + + operator bool() { return !this->Empty(); } + + private: + SizeT fCount{0UL}; +}; + +template <typename KeyType, typename ValueType> +inline auto make_dict() { + return CFDictionary<KeyType, ValueType>{}; +} +} // namespace CF diff --git a/public/tools/diutil/dist/.touch b/public/tools/diutil/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/diutil/dist/.touch diff --git a/public/tools/ld.dyn/dist/.touch b/public/tools/ld.dyn/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/ld.dyn/dist/.touch diff --git a/public/tools/ld.fwrk/dist/.touch b/public/tools/ld.fwrk/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/ld.fwrk/dist/.touch diff --git a/public/tools/mgmt.oe/dist/.keep b/public/tools/mgmt.oe/dist/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mgmt.oe/dist/.keep diff --git a/public/tools/mk.fwrk/dist/.touch b/public/tools/mk.fwrk/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mk.fwrk/dist/.touch diff --git a/public/tools/mk.hefs/dist/.touch b/public/tools/mk.hefs/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mk.hefs/dist/.touch diff --git a/public/tools/mk.nefs/dist/.touch b/public/tools/mk.nefs/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mk.nefs/dist/.touch diff --git a/public/tools/ping/dist/.touch b/public/tools/ping/dist/.touch new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/ping/dist/.touch |
