diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-17 09:59:40 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-17 09:59:40 +0200 |
| commit | e42b9ddb9121cd69cfb6b5bc0d7efc31653b72a0 (patch) | |
| tree | de3eb3c2ce986800c91bae153db2027cc24d91e2 /dev/kernel/src/UtfUtils.cc | |
| parent | 65a97e32ef586e073988186f1f4932c0193b3409 (diff) | |
feat(kernel): don't schedule process when it's under signals such as:
ABRT, KILL, TRAP.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/UtfUtils.cc')
| -rw-r--r-- | dev/kernel/src/UtfUtils.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dev/kernel/src/UtfUtils.cc b/dev/kernel/src/UtfUtils.cc index 11d7471a..1374ee86 100644 --- a/dev/kernel/src/UtfUtils.cc +++ b/dev/kernel/src/UtfUtils.cc @@ -25,7 +25,17 @@ Void urt_set_memory(const voidPtr src, UInt32 dst, Size len) { } } -Int urt_copy_memory(const voidPtr src, voidPtr dst, Size len) { +Int32 rt_string_cmp(const Utf8Char* src, const Utf8Char* cmp, Size size) { + Int32 counter = 0; + + for (Size index = 0; index < size; ++index) { + if (src[index] != cmp[index]) ++counter; + } + + return counter; +} + +Int urt_copy_memory(const VoidPtr src, VoidPtr dst, Size len) { Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src); Utf8Char* dstChar = reinterpret_cast<Utf8Char*>(dst); |
