../checkin_notes

svn path=/trunk/boinc/; revision=3803
This commit is contained in:
Daniel Hsu 2004-07-06 23:26:31 +00:00
parent fca77e51d9
commit 25b93cf322
4 changed files with 14 additions and 18 deletions

View File

@ -1243,7 +1243,7 @@ int ACTIVE_TASK::suspend() {
#ifdef _WIN32
SuspendThread(thread_handle);
#else
kill(pid, SIGSTOP);
kill(pid, SIGTSTP);
#endif
return 0;
}

View File

@ -252,14 +252,12 @@ public:
PROJECT* next_project(PROJECT*);
int make_scheduler_request(PROJECT*, double);
int handle_scheduler_reply(PROJECT*, char* scheduler_url, int& nresults);
int compute_work_requests();
private:
SCHEDULER_OP* scheduler_op;
bool contacted_sched_server;
void compute_resource_debts();
int compute_work_requests();
PROJECT* find_project_with_overdue_results();
void current_work_buf_days(double& work_buf, int& nactive_results);
PROJECT* next_project_sched_rpc_pending();
bool some_project_rpc_ok();
bool scheduler_rpc_poll();

View File

@ -21,6 +21,8 @@
// when to compute, how much disk to use, etc.
//
#include "cpp.h"
#ifdef _WIN32
#include "boinc_win.h"
#endif

View File

@ -80,19 +80,12 @@ bool SCHEDULER_OP::check_master_fetch_start() {
int SCHEDULER_OP::init_get_work() {
int retval;
char err_msg[256];
double ns = gstate.work_needed_secs();
// in some cases we get work to keep all CPUs busy,
// even though we have at least the min buf.
// In this case just ask for 1 sec
//
if (ns == 0) {
ns = 1.0;
}
double ns;
must_get_work = true;
project = gstate.next_project(0);
if (project) {
ns = project->work_request;
msg_printf(project, MSG_INFO,
"Requesting %.0f seconds of work", ns
);
@ -447,9 +440,12 @@ bool SCHEDULER_OP::poll() {
} else {
backoff(project, "No schedulers responded");
if (must_get_work) {
int urgency = gstate.compute_work_requests();
project = gstate.next_project(project);
if (project) {
retval = init_op_project(gstate.work_needed_secs());
if (urgency != DONT_NEED_WORK
&& project != 0
) {
retval = init_op_project(project->work_request);
} else {
scheduler_op_done = true;
}
@ -504,11 +500,11 @@ bool SCHEDULER_OP::poll() {
// ask another project for work
//
if (must_get_work) {
double x = gstate.work_needed_secs();
if (x > 0) {
int urgency = gstate.compute_work_requests();
if (urgency != DONT_NEED_WORK) {
project = gstate.next_project(project);
if (project) {
retval = init_op_project(x);
retval = init_op_project(project->work_request);
} else {
scheduler_op_done = true;
}