sched: use this_task replace nxsched_self

reason:
We can reduce a function call to improve performance.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2024-07-15 17:52:00 +08:00
committed by Alan C. Assis
parent cc0d4af20a
commit 198630a809
33 changed files with 92 additions and 68 deletions
+2 -2
View File
@@ -197,7 +197,7 @@ int lm32_swint(int irq, void *context, void *arg)
#ifdef CONFIG_BUILD_KERNEL
case SYS_syscall_return:
{
struct tcb_s *rtcb = nxsched_self();
struct tcb_s *rtcb = this_task();
int index = (int)rtcb->xcp.nsyscalls - 1;
/* Make sure that there is a saved syscall return address. */
@@ -230,7 +230,7 @@ int lm32_swint(int irq, void *context, void *arg)
default:
{
#ifdef CONFIG_BUILD_KERNEL
struct tcb_s *rtcb = nxsched_self();
struct tcb_s *rtcb = this_task();
int index = rtcb->xcp.nsyscalls;
/* Verify that the SYS call number is within range */
+2 -2
View File
@@ -167,7 +167,7 @@ int minerva_swint(int irq, void *context, void *arg)
#ifdef CONFIG_BUILD_KERNEL
case SYS_syscall_return:
{
struct tcb_s *rtcb = nxsched_self();
struct tcb_s *rtcb = this_task();
int index = (int)rtcb->xcp.nsyscalls - 1;
/* Make sure that there is a saved syscall return address. */
@@ -200,7 +200,7 @@ int minerva_swint(int irq, void *context, void *arg)
default:
{
#ifdef CONFIG_BUILD_KERNEL
struct tcb_s *rtcb = nxsched_self();
struct tcb_s *rtcb = this_task();
int index = rtcb->xcp.nsyscalls;
/* Verify that the SYS call number is within range */