From 829c5b4e82258f79eae70020749d7c058d7c6457 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 16 Jan 2007 22:57:08 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11886 --- checkin_notes | 8 ++++++++ client/app.h | 1 + client/cpu_sched.C | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/checkin_notes b/checkin_notes index 7342fcd2d8..8a8ab19be0 100755 --- a/checkin_notes +++ b/checkin_notes @@ -662,3 +662,11 @@ Rom 16 Jan 2007 clientgui/ sg_ProjectsComponent.cpp + +David 16 Jan 2007 + - core client: don't try to schedule a task whose state is + PROCESS_ABORT_PENDING. + + client/ + app.h + cpu_sched.C diff --git a/client/app.h b/client/app.h index 2a4df8385f..b0fc31621c 100644 --- a/client/app.h +++ b/client/app.h @@ -145,6 +145,7 @@ public: void check_graphics_mode_ack(); int link_user_files(); int get_shmem_seg_name(); + bool runnable() { return task_state != PROCESS_ABORT_PENDING; } ACTIVE_TASK(); ~ACTIVE_TASK(); diff --git a/client/cpu_sched.C b/client/cpu_sched.C index 0760bce1f3..c2252c2198 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -89,6 +89,9 @@ static bool more_preemptable(ACTIVE_TASK* t0, ACTIVE_TASK* t1) { // 3. results with active tasks that have no process // 4. results with no active task // +// TODO: this is called in a loop over NCPUs, which is silly. +// Should call it once, and have it make an ordered list per project. +// void CLIENT_STATE::assign_results_to_projects() { unsigned int i; RESULT* rp; @@ -98,6 +101,7 @@ void CLIENT_STATE::assign_results_to_projects() { // for (i=0; irunnable()) continue; rp = atp->result; if (rp->already_selected) continue; if (!rp->runnable()) continue;