🎯 Sync smart & scheduler codes (#8537)

Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
Shell
2024-02-23 17:49:15 +08:00
committed by GitHub
co-authored by xqyjlj
parent 6fe69d7431
commit 71560bafb5
71 changed files with 6218 additions and 2329 deletions
+1
View File
@@ -13,6 +13,7 @@
#define CPUPORT_H__
#include <armv8.h>
#include <rtcompiler.h>
#include <rtdef.h>
#ifdef RT_USING_SMP
+1 -1
View File
@@ -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
+7
View File
@@ -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);
}
/*@}*/
+2
View File
@@ -10,6 +10,8 @@
#ifndef CPUPORT_H__
#define CPUPORT_H__
#include <rtcompiler.h>
/* the exception stack without VFP registers */
struct rt_hw_exp_stack
{
+5
View File
@@ -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