From 1865c30de82e74403be1bd91cee9757ab0203be1 Mon Sep 17 00:00:00 2001
From: turbocat <turbocat@kolibrios.org>
Date: Mon, 6 Jun 2022 21:51:08 +0000
Subject: [PATCH] [KERNEL]: Remove unused get_curr_task and replace with
 get_curr_slot

git-svn-id: svn://kolibrios.org@9832 a494cfbc-eb01-0410-851d-a64ba20cac60
---
 kernel/trunk/core/dll.inc     | 6 ------
 kernel/trunk/core/exports.inc | 2 +-
 kernel/trunk/core/taskman.inc | 4 ++++
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/kernel/trunk/core/dll.inc b/kernel/trunk/core/dll.inc
index 1929b3cf74..2e18a50f5c 100644
--- a/kernel/trunk/core/dll.inc
+++ b/kernel/trunk/core/dll.inc
@@ -301,12 +301,6 @@ proc get_coff_sym stdcall, pSym:dword,count:dword, sz_sym:dword
         ret
 endp
 
-align 4
-proc get_curr_task
-        mov     eax, [current_slot_idx]
-        shl     eax, 8
-        ret
-endp
 
 align 4
 proc get_fileinfo stdcall, file_name:dword, info:dword
diff --git a/kernel/trunk/core/exports.inc b/kernel/trunk/core/exports.inc
index 79d0ddfd4d..6f9b67e1c1 100644
--- a/kernel/trunk/core/exports.inc
+++ b/kernel/trunk/core/exports.inc
@@ -99,7 +99,7 @@ __exports:
 \
           load_cursor,           'LoadCursor',         \      ;stdcall
 \
-          get_curr_task,         'GetCurrentTask',     \
+          get_curr_slot,         'GetCurrSlot',        \
           change_task,           'ChangeTask',         \
           load_file,             'LoadFile',           \      ;retval eax, ebx
           delay_ms,              'Sleep',              \
diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc
index 59af3b5c8a..550be78db4 100644
--- a/kernel/trunk/core/taskman.inc
+++ b/kernel/trunk/core/taskman.inc
@@ -1066,5 +1066,9 @@ get_stack_base:
         mov     eax, [eax + APPDATA.pl0_stack]
         ret
 
+align 4
+get_curr_slot:
+        mov     eax, [current_slot]
+        ret
 
 include "debug.inc"