mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
🎯 Sync smart & scheduler codes (#8537)
Signed-off-by: Shell <smokewood@qq.com> Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define CPUPORT_H__
|
||||
|
||||
#include <armv8.h>
|
||||
#include <rtcompiler.h>
|
||||
#include <rtdef.h>
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
|
||||
@@ -151,7 +151,7 @@ _secondary_cpu_entry:
|
||||
#else
|
||||
bl rt_hw_cpu_id_set
|
||||
mrs x0, tpidr_el1
|
||||
#endif
|
||||
#endif /* RT_USING_OFW */
|
||||
|
||||
/* Set current cpu's stack top */
|
||||
sub x0, x0, #1
|
||||
|
||||
@@ -103,4 +103,11 @@ int __rt_ffs(int value)
|
||||
}
|
||||
#endif
|
||||
|
||||
rt_bool_t rt_hw_interrupt_is_disabled(void)
|
||||
{
|
||||
int rc;
|
||||
__asm__ volatile("mrs %0, cpsr" : "=r" (rc));
|
||||
return !!(rc & 0x80);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#ifndef CPUPORT_H__
|
||||
#define CPUPORT_H__
|
||||
|
||||
#include <rtcompiler.h>
|
||||
|
||||
/* the exception stack without VFP registers */
|
||||
struct rt_hw_exp_stack
|
||||
{
|
||||
|
||||
@@ -56,6 +56,11 @@ void *_rt_hw_stack_init(rt_ubase_t *sp, rt_ubase_t ra, rt_ubase_t sstatus)
|
||||
return (void *)sp;
|
||||
}
|
||||
|
||||
int rt_hw_cpu_id(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will initialize thread stack, we assuming
|
||||
* when scheduler restore this new thread, context will restore
|
||||
|
||||
Reference in New Issue
Block a user