Merge branch rk3568_dev of https://www.gitlink.org.cn/tuyuyang/xiuos with commit 6bc856b7a6 into local

This commit is contained in:
songyanguang
2024-08-15 19:26:02 +08:00
parent 059da067df
commit a9273b9879
155 changed files with 2734 additions and 2127 deletions

View File

@@ -31,10 +31,10 @@ Modification:
#include "core.h"
#include "bitmap64.h"
#include "buddy.h"
#include "ksemaphore.h"
#include "list.h"
#include "memspace.h"
#include "object_allocator.h"
#include "pagetable.h"
#include "share_page.h"
@@ -54,19 +54,6 @@ enum ProcState {
NEVER_RUN,
};
struct MemSpace {
/* task memory resources */
struct TopLevelPageDirectory pgdir; // [phy] vm pgtbl base address
uintptr_t heap_base; // mem size of proc used(allocated by kernel)
uintptr_t mem_size;
/* task communication mem resources */
struct KBuddy* massive_ipc_allocator;
/* thread using this memspace */
struct bitmap64 thread_stack_idx_bitmap;
struct double_list_node thread_list_guard;
};
/* Thread Control Block */
struct ThreadContext {
struct Thread* task; // process of current thread
@@ -105,8 +92,8 @@ struct Thread {
/* task communication resources */
struct double_list_node cli_sess_listhead;
struct double_list_node svr_sess_listhead;
bool current_ipc_handled;
struct TraceTag server_identifier;
bool advance_unblock;
/* task schedule attributes */
struct double_list_node node;
@@ -122,6 +109,7 @@ struct SchedulerRightGroup {
};
struct XiziTaskManager {
TraceTag tag;
/* thead schedule lists */
struct double_list_node task_list_head[TASK_MAX_PRIORITY]; /* list of task control blocks that are allocated */
struct double_list_node task_running_list_head;
@@ -162,5 +150,4 @@ extern uint32_t ready_task_priority;
extern struct Thread* next_task_emergency;
extern struct XiziTaskManager xizi_task_manager;
int spawn_embedded_task(char* img_start, char* name, char** argv);
bool module_task_manager_init(void);
bool module_task_manager_init(TraceTag* softkernel_tag);