From b66e3726857b175ac841ef5c5c249357267d6bfa Mon Sep 17 00:00:00 2001 From: vitalkrilov Date: Sun, 5 Jun 2022 08:46:07 +0000 Subject: [PATCH] ksys.h: - KSYS_SLOT_STATE_FREE has right value (9, not 6) now - few style changes (snake_case) git-svn-id: svn://kolibrios.org@9830 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../sources/newlib/libc/include/sys/ksys.h | 24 +++++++++---------- .../ktcc/trunk/libc.obj/include/sys/ksys.h | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/contrib/sdk/sources/newlib/libc/include/sys/ksys.h b/contrib/sdk/sources/newlib/libc/include/sys/ksys.h index 0b4d858a7a..7ea0a3b5a3 100644 --- a/contrib/sdk/sources/newlib/libc/include/sys/ksys.h +++ b/contrib/sdk/sources/newlib/libc/include/sys/ksys.h @@ -483,7 +483,7 @@ enum KSYS_SLOT_STATES { KSYS_SLOT_STATE_NORMAL_TERM = 3, KSYS_SLOT_STATE_EXCEPT_TERM = 4, KSYS_SLOT_STATE_WAIT_EVENT = 5, - KSYS_SLOT_STATE_FREE = 6 + KSYS_SLOT_STATE_FREE = 9 }; KOSAPI int _ksys_thread_info(ksys_thread_t* table, int slot) @@ -1580,48 +1580,48 @@ KOSAPI void _ksys_set_window_title(const char* title) /*============= Function 77, subfunction 0 - create futex object =============*/ -KOSAPI void* _ksys_futex_create(void* futexControlAddr) { - void* futexDesc; +KOSAPI void* _ksys_futex_create(void* futex_control_addr) { + void* futex_desc; asm_inline( "int $0x40" - : "=a"(futexDesc) - : "a"(77), "b"(0), "c"(futexControlAddr) + : "=a"(futex_desc) + : "a"(77), "b"(0), "c"(futex_control_addr) : "memory"); - return futexDesc; + return futex_desc; } /*============= Function 77, subfunction 1 - destroy futex object =============*/ -KOSAPI int _ksys_futex_destroy(void* futexDesc) { +KOSAPI int _ksys_futex_destroy(void* futex_desc) { int res; asm_inline( "int $0x40" : "=a"(res) - : "a"(77), "b"(1), "c"(futexDesc) + : "a"(77), "b"(1), "c"(futex_desc) : "memory"); return res; } /*============= Function 77, subfunction 2 - futex wait =============*/ -KOSAPI int _ksys_futex_wait(void* futexDesc, int controlVal, int timeout) { +KOSAPI int _ksys_futex_wait(void* futex_desc, int control_val, int timeout) { int res; asm_inline( "int $0x40" : "=a"(res) - : "a"(77), "b"(2), "c"(futexDesc), "d"(controlVal), "S"(timeout) + : "a"(77), "b"(2), "c"(futex_desc), "d"(control_val), "S"(timeout) : "memory"); return res; } /*============= Function 77, subfunction 3 - futex wake =============*/ -KOSAPI int _ksys_futex_wake(void* futexDesc, int maxWakeCount) { +KOSAPI int _ksys_futex_wake(void* futex_desc, int max_wake_count) { int count; asm_inline( "int $0x40" : "=a"(count) - : "a"(77), "b"(3), "c"(futexDesc), "d"(maxWakeCount) + : "a"(77), "b"(3), "c"(futex_desc), "d"(max_wake_count) : "memory"); return count; } diff --git a/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h b/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h index 0b4d858a7a..7ea0a3b5a3 100644 --- a/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h +++ b/programs/develop/ktcc/trunk/libc.obj/include/sys/ksys.h @@ -483,7 +483,7 @@ enum KSYS_SLOT_STATES { KSYS_SLOT_STATE_NORMAL_TERM = 3, KSYS_SLOT_STATE_EXCEPT_TERM = 4, KSYS_SLOT_STATE_WAIT_EVENT = 5, - KSYS_SLOT_STATE_FREE = 6 + KSYS_SLOT_STATE_FREE = 9 }; KOSAPI int _ksys_thread_info(ksys_thread_t* table, int slot) @@ -1580,48 +1580,48 @@ KOSAPI void _ksys_set_window_title(const char* title) /*============= Function 77, subfunction 0 - create futex object =============*/ -KOSAPI void* _ksys_futex_create(void* futexControlAddr) { - void* futexDesc; +KOSAPI void* _ksys_futex_create(void* futex_control_addr) { + void* futex_desc; asm_inline( "int $0x40" - : "=a"(futexDesc) - : "a"(77), "b"(0), "c"(futexControlAddr) + : "=a"(futex_desc) + : "a"(77), "b"(0), "c"(futex_control_addr) : "memory"); - return futexDesc; + return futex_desc; } /*============= Function 77, subfunction 1 - destroy futex object =============*/ -KOSAPI int _ksys_futex_destroy(void* futexDesc) { +KOSAPI int _ksys_futex_destroy(void* futex_desc) { int res; asm_inline( "int $0x40" : "=a"(res) - : "a"(77), "b"(1), "c"(futexDesc) + : "a"(77), "b"(1), "c"(futex_desc) : "memory"); return res; } /*============= Function 77, subfunction 2 - futex wait =============*/ -KOSAPI int _ksys_futex_wait(void* futexDesc, int controlVal, int timeout) { +KOSAPI int _ksys_futex_wait(void* futex_desc, int control_val, int timeout) { int res; asm_inline( "int $0x40" : "=a"(res) - : "a"(77), "b"(2), "c"(futexDesc), "d"(controlVal), "S"(timeout) + : "a"(77), "b"(2), "c"(futex_desc), "d"(control_val), "S"(timeout) : "memory"); return res; } /*============= Function 77, subfunction 3 - futex wake =============*/ -KOSAPI int _ksys_futex_wake(void* futexDesc, int maxWakeCount) { +KOSAPI int _ksys_futex_wake(void* futex_desc, int max_wake_count) { int count; asm_inline( "int $0x40" : "=a"(count) - : "a"(77), "b"(3), "c"(futexDesc), "d"(maxWakeCount) + : "a"(77), "b"(3), "c"(futex_desc), "d"(max_wake_count) : "memory"); return count; }