mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-11 13:39:55 +02:00
System/Jakt/OS: Fix @os_call() binding to use U64 addr instead of hash table lookup
This commit is contained in:
@@ -9,20 +9,13 @@ U0 _Z8os_blinkPKc()
|
|||||||
POP_SYSV_REGS
|
POP_SYSV_REGS
|
||||||
}
|
}
|
||||||
|
|
||||||
U64 @os_call(U8* function_name, U64 arg)
|
U64 @os_call(U64 addr, U64 val)
|
||||||
{
|
{
|
||||||
if (!function_name)
|
if (!addr || !val)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!StrLen(function_name))
|
U64 (*func)(U64 arg);
|
||||||
return NULL;
|
func = addr;
|
||||||
CHash* h = HashFind(function_name, Fs->hash_table, Fs->hash_table->mask);
|
return func(val);
|
||||||
if (!h)
|
|
||||||
return NULL;
|
|
||||||
if (h->type & HTT_FUN == HTT_FUN) {
|
|
||||||
CallInd(h(CHashFun*)->exe_addr, arg);
|
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
U0 _Z7os_callmm()
|
U0 _Z7os_callmm()
|
||||||
|
|||||||
Reference in New Issue
Block a user