Rename struct Thread; Completely split task memspace and shceduling

This commit is contained in:
TXuian
2024-05-18 21:37:30 +08:00
parent 0b858de120
commit 736ba18769
36 changed files with 636 additions and 260 deletions

View File

@@ -31,14 +31,14 @@ Modification:
#include "task.h"
extern int sys_exit(struct TaskMicroDescriptor* task);
extern int sys_exit(struct Thread* task);
int sys_kill(int id)
{
struct TaskMicroDescriptor* task = NULL;
struct Thread* task = NULL;
// check if task is a running one
DOUBLE_LIST_FOR_EACH_ENTRY(task, &xizi_task_manager.task_running_list_head, node)
{
if (task->pid == id) {
if (task->tid == id) {
sys_exit(task);
return 0;
}
@@ -47,7 +47,7 @@ int sys_kill(int id)
// check if task is a blocking one
DOUBLE_LIST_FOR_EACH_ENTRY(task, &xizi_task_manager.task_blocked_list_head, node)
{
if (task->pid == id) {
if (task->tid == id) {
sys_exit(task);
return 0;
}
@@ -57,7 +57,7 @@ int sys_kill(int id)
for (int prio = 0; prio < TASK_MAX_PRIORITY; prio++) {
DOUBLE_LIST_FOR_EACH_ENTRY(task, &xizi_task_manager.task_list_head[prio], node)
{
if (task->pid == id) {
if (task->tid == id) {
sys_exit(task);
return 0;
}