Blog

Rcore Gangs Fixed Now

In an exclusive interview, Jane Doe told us her experience of what happened before, during, and after she was sex trafficked by GirlsDoPorn. This is her story.

rcore gangs

Rcore Gangs Fixed Now

impl GangScheduler pub fn new() -> Self Self gangs: BTreeMap::new(), task_to_gang: BTreeMap::new(), ready_gangs: VecDeque::new(),

impl Scheduler for HybridScheduler fn push(&mut self, task: Arc<TaskControlBlock>) if let Some(gang_id) = self.gang_sched.task_to_gang.get(&task.tid) self.gang_sched.notify_task_ready(task.tid); else self.inner.push(task); rcore gangs

/// Pick the next runnable gang, then return its next member to run pub fn pick_next_task(&mut self) -> Option<usize> while let Some(gang_id) = self.ready_gangs.pop_front() let gang = self.gangs.get(&gang_id).unwrap(); let mut gang_lock = gang.lock(); if gang_lock.status == GangStatus::Runnable gang_lock.status = GangStatus::Running; // Return the first member that isn't already running on a CPU for &tid in &gang_lock.members if !is_task_running_on_another_cpu(tid) return Some(tid); // If all already running (rare), re-queue self.ready_gangs.push_back(gang_id); None impl GangScheduler pub fn new() -&gt; Self Self

#[derive(PartialEq)] pub enum GangStatus Pending, // waiting for all members to be ready Runnable, // all ready, can schedule Running, // currently scheduled on CPUs impl GangScheduler pub fn new() -&gt