diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-09-28 17:01:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-28 17:01:48 +0200 |
| commit | 2117a9b0f4b84f5bd6c99566bcf5849a64104467 (patch) | |
| tree | 590b20056c62d04a496aa22f6bee0034a1430e4e /dev/libSystem/SystemKit/Syscall.h | |
| parent | 0f88e96c0cf7ffaccecae94794024164c510f735 (diff) | |
| parent | b1302067703566624390d780dffd621bb99bb439 (diff) | |
Merge pull request #64 from nekernel-org/dev
ver: `kernel` v0.0.6
Diffstat (limited to 'dev/libSystem/SystemKit/Syscall.h')
| -rw-r--r-- | dev/libSystem/SystemKit/Syscall.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/dev/libSystem/SystemKit/Syscall.h b/dev/libSystem/SystemKit/Syscall.h index a1505b46..35bfc6f8 100644 --- a/dev/libSystem/SystemKit/Syscall.h +++ b/dev/libSystem/SystemKit/Syscall.h @@ -14,22 +14,8 @@ IMPORT_C VoidPtr libsys_syscall_arg_2(SizeT id, VoidPtr arg1); IMPORT_C VoidPtr libsys_syscall_arg_3(SizeT id, VoidPtr arg1, VoidPtr arg3); IMPORT_C VoidPtr libsys_syscall_arg_4(SizeT id, VoidPtr arg1, VoidPtr arg3, VoidPtr arg4); -inline UInt64 libsys_hash_64(const Char* path) { - if (!path || *path == 0) return 0; - - const UInt64 FNV_OFFSET_BASIS = 0xcbf29ce484222325ULL; - const UInt64 FNV_PRIME = 0x100000001b3ULL; - - UInt64 hash = FNV_OFFSET_BASIS; - - while (*path) { - hash ^= (Char) (*path++); - hash *= FNV_PRIME; - } - - return hash; -} +IMPORT_C UInt64 libsys_hash_64(const Char* path); #ifndef SYSCALL_HASH #define SYSCALL_HASH(str) libsys_hash_64(str) -#endif // !SYSCALL_HASH
\ No newline at end of file +#endif // !SYSCALL_HASH |
