Remove cpu_affinity field from OSTD Task struct

This commit is contained in:
jellllly420
2024-08-28 17:47:46 +08:00
committed by Tate, Hongliang Tian
parent 8927031426
commit 9cc63149f1
6 changed files with 29 additions and 27 deletions

View File

@ -2,7 +2,7 @@
#![allow(dead_code)]
use ostd::{task::Task, user::UserSpace};
use ostd::{cpu::CpuSet, task::Task, user::UserSpace};
use super::{thread_table, PosixThread};
use crate::{
@ -113,11 +113,13 @@ impl PosixThreadBuilder {
let status = ThreadStatus::Init;
let priority = Priority::default();
let cpu_affinity = CpuSet::new_full();
let thread = Arc::new(Thread::new(
weak_task.clone(),
posix_thread,
status,
priority,
cpu_affinity,
));
thread_table::add_thread(tid, thread.clone());