mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user