newlib: Fixed kolibrios syscall return value

Signed-off-by: Maxim Logaev <maxlogaev@proton.me>
This commit is contained in:
2026-01-07 02:13:14 +03:00
committed by Max Logaev
parent f7007019c4
commit abc6739ee6

View File

@@ -6,7 +6,7 @@
*
* Copyright (C) 2025-2026 KolibriOS team
* Author: Maxim Logaev <maxlogaev@proton.me>
*/
*/
#ifndef _KOLIBRIOS_SYSCALL_H_
#define _KOLIBRIOS_SYSCALL_H_
@@ -351,7 +351,7 @@ extern "C"
#ifndef __ASSEMBLER__
static inline unsigned long
static inline long
_ksys0 (unsigned long eax)
{
unsigned long ret;
@@ -359,7 +359,7 @@ _ksys0 (unsigned long eax)
return ret;
}
static inline unsigned long
static inline long
_ksys1 (unsigned long eax, unsigned long ebx)
{
unsigned long ret;
@@ -370,7 +370,7 @@ _ksys1 (unsigned long eax, unsigned long ebx)
return ret;
}
static inline unsigned long
static inline long
_ksys2 (unsigned long eax, unsigned long ebx, unsigned long ecx)
{
unsigned long ret;
@@ -381,7 +381,7 @@ _ksys2 (unsigned long eax, unsigned long ebx, unsigned long ecx)
return ret;
}
static inline unsigned long
static inline long
_ksys3 (unsigned long eax, unsigned long ebx, unsigned long ecx,
unsigned long edx)
{
@@ -393,27 +393,27 @@ _ksys3 (unsigned long eax, unsigned long ebx, unsigned long ecx,
return ret;
}
static inline unsigned long
static inline long
_ksys4 (unsigned long eax, unsigned long ebx, unsigned long ecx,
unsigned long edx, unsigned long edi)
unsigned long edx, unsigned long esi)
{
unsigned long ret;
__asm__ __volatile__ ("int $0x40"
: "=a"(ret)
: "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "D"(edi)
: "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "S"(esi)
: "memory");
return ret;
}
static inline unsigned long
static inline long
_ksys5 (unsigned long eax, unsigned long ebx, unsigned long ecx,
unsigned long edx, unsigned long edi, unsigned long esi)
unsigned long edx, unsigned long esi, unsigned long edi)
{
unsigned long ret;
__asm__ __volatile__ ("int $0x40"
: "=a"(ret)
: "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "D"(edi),
"S"(esi)
: "a"(eax), "b"(ebx), "c"(ecx), "d"(edx), "S"(esi),
"D"(edi)
: "memory");
return ret;
}