From ac77678d16c55a54516d7f2a7c4a52c1f4dd9d7b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 23 May 2008 22:20:45 +0000 Subject: [PATCH] - client: test the above; compile fixes for Win svn path=/trunk/boinc/; revision=15290 --- checkin_notes | 8 ++++++++ client/client_types.h | 4 ++-- client/cpu_sched.C | 4 +--- client/sim_util.C | 4 +--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/checkin_notes b/checkin_notes index d98d0c3fb3..503abae710 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4307,3 +4307,11 @@ David May 23 2008 cpu_sched.C lib/ coproc.h + +David May 23 2008 + - client: test the above; compile fixes for Win + + client/ + client_types.h + cpu_sched.C + sim_util.C diff --git a/client/client_types.h b/client/client_types.h index b4018d4414..1a4b551786 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -178,8 +178,8 @@ struct RR_SIM_PROJECT_STATUS { inline bool none_active() { return !active.size(); } - inline bool can_run(RESULT* p, int ncpus) { - return active.size() < (int)ncpus; + inline bool can_run(RESULT*, int ncpus) { + return (int)active.size() < ncpus; } inline void remove_active(RESULT* r) { std::vector::iterator it = active.begin(); diff --git a/client/cpu_sched.C b/client/cpu_sched.C index 4902ab0192..2757daabc2 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -579,7 +579,7 @@ void CLIENT_STATE::schedule_cpus() { double expected_payoff; unsigned int i; double rrs = runnable_resource_share(); - double ncpus_used; + double ncpus_used = 0; if (log_flags.cpu_sched_debug) { msg_printf(0, MSG_INFO, "[cpu_sched_debug] schedule_cpus(): start"); @@ -620,7 +620,6 @@ void CLIENT_STATE::schedule_cpus() { #ifdef SIM if (!cpu_sched_rr_only) { #endif - ncpus_used = 0; while (ncpus_used < ncpus) { rp = earliest_deadline_result(); if (!rp) break; @@ -1144,7 +1143,6 @@ void CLIENT_STATE::rr_simulation() { RESULT* rp, *rpbest; RR_SIM_STATUS sim_status; unsigned int i; - double x; sim_status.coprocs.clone(coprocs); double ar = available_ram(); diff --git a/client/sim_util.C b/client/sim_util.C index b96a28591d..267c1303f8 100644 --- a/client/sim_util.C +++ b/client/sim_util.C @@ -156,9 +156,7 @@ void SIM_PROJECT::init() { project_files_downloaded_time = 0; // Initialize scratch variables. - rrsim_proc_rate = 0.0; - cpu_shortfall = 0.0; - rr_sim_deadlines_missed = 0; + rr_sim_status.clear(); deadlines_missed = 0; // sim-specific: