mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5207
This commit is contained in:
parent
d8d776db51
commit
3cbe6cebe5
|
@ -23236,3 +23236,20 @@ Rom 24 Jan 2005
|
|||
|
||||
/
|
||||
configure.ac
|
||||
|
||||
David 25 Jan 2005
|
||||
Policy change: apps of non-CPU-intensive projects are never suspended
|
||||
- Change ACTIVE_TASK_SET::suspend_all() and unsuspend_all()
|
||||
to skip non-CPU-intensive projects.
|
||||
- Ignore GUI RPC requests to suspend non-CPU-intensive projects or results
|
||||
- Add the non_cpu_intensive flag to GUI RPC's PROJECT structure.
|
||||
GUIs should not show suspend/resume buttons
|
||||
for non-CPU-intensive projects or results
|
||||
|
||||
client/
|
||||
app_control.C
|
||||
gui_rpc_server.C
|
||||
lib/
|
||||
gui_rpc_client.C,h
|
||||
html/project.sample/
|
||||
project.inc
|
||||
|
|
|
@ -717,6 +717,7 @@ void ACTIVE_TASK_SET::suspend_all(bool leave_apps_in_memory) {
|
|||
for (i=0; i<active_tasks.size(); i++) {
|
||||
atp = active_tasks[i];
|
||||
if (atp->task_state != PROCESS_EXECUTING) continue;
|
||||
if (atp->result->project->non_cpu_intensive) continue;
|
||||
if (leave_apps_in_memory) {
|
||||
atp->suspend();
|
||||
} else {
|
||||
|
@ -733,6 +734,7 @@ void ACTIVE_TASK_SET::unsuspend_all() {
|
|||
ACTIVE_TASK* atp;
|
||||
for (i=0; i<active_tasks.size(); i++) {
|
||||
atp = active_tasks[i];
|
||||
if (atp->result->project->non_cpu_intensive) continue;
|
||||
if (atp->scheduler_state != CPU_SCHED_SCHEDULED) continue;
|
||||
if (atp->task_state == PROCESS_UNINITIALIZED) {
|
||||
if (atp->start(false)) {
|
||||
|
|
|
@ -162,7 +162,11 @@ static void handle_project_op(char* buf, MIOFILE& fout, char* op) {
|
|||
if (!strcmp(op, "reset")) {
|
||||
gstate.reset_project(p);
|
||||
} else if (!strcmp(op, "suspend")) {
|
||||
p->suspended_via_gui = true;
|
||||
if (p->non_cpu_intensive) {
|
||||
msg_printf(p, MSG_ERROR, "Can't suspend non-CPU-intensive project");
|
||||
} else {
|
||||
p->suspended_via_gui = true;
|
||||
}
|
||||
} else if (!strcmp(op, "resume")) {
|
||||
p->suspended_via_gui = false;
|
||||
} else if (!strcmp(op, "detach")) {
|
||||
|
@ -390,7 +394,11 @@ static void handle_result_op(char* buf, MIOFILE& fout, char* op) {
|
|||
rp->aborted_via_gui = true;
|
||||
}
|
||||
} else if (!strcmp(op, "suspend")) {
|
||||
rp->suspended_via_gui = true;
|
||||
if (p->non_cpu_intensive) {
|
||||
msg_printf(p, MSG_ERROR, "Can't suspend non-CPU-intensive result");
|
||||
} else {
|
||||
rp->suspended_via_gui = true;
|
||||
}
|
||||
} else if (!strcmp(op, "resume")) {
|
||||
rp->suspended_via_gui = false;
|
||||
}
|
||||
|
|
|
@ -40,33 +40,30 @@ function project_footer($show_return, $show_date) {
|
|||
}
|
||||
}
|
||||
|
||||
// NOTE: These functions appear here and not in profile.inc because they contain
|
||||
// project-specific information that needs to be set by the project administrators.
|
||||
|
||||
function show_profile_heading1() {
|
||||
row1("Your personal background.");
|
||||
return "Your personal background.";
|
||||
}
|
||||
|
||||
function show_profile_question1() {
|
||||
rowify("
|
||||
return "
|
||||
Tell us about yourself.
|
||||
You could tell us where you're from, your age, occupation, hobbies,
|
||||
or anything else about yourself.
|
||||
");
|
||||
";
|
||||
}
|
||||
|
||||
function show_profile_heading2() {
|
||||
row1("Your opinions about " . PROJECT);
|
||||
return "Your opinions about " . PROJECT;
|
||||
}
|
||||
|
||||
function show_profile_question2() {
|
||||
rowify("
|
||||
return "
|
||||
Tell us your thoughts about " . PROJECT . "<ol>
|
||||
<li>Why do you run " . PROJECT . "?
|
||||
<li>What are your views about the project?
|
||||
<li>Any suggestions?
|
||||
</ol>
|
||||
");
|
||||
";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -103,6 +103,10 @@ int PROJECT::parse(MIOFILE& in) {
|
|||
sched_rpc_pending = true;
|
||||
continue;
|
||||
}
|
||||
else if (match_tag(buf, "<non_cpu_intensive/>")) {
|
||||
non_cpu_intensive = true;
|
||||
continue;
|
||||
}
|
||||
else if (match_tag(buf, "<suspended_via_gui/>")) {
|
||||
suspended_via_gui = true;
|
||||
continue;
|
||||
|
@ -173,6 +177,7 @@ void PROJECT::clear() {
|
|||
master_url_fetch_pending = false;
|
||||
sched_rpc_pending = false;
|
||||
tentative = false;
|
||||
non_cpu_intensive = false;
|
||||
suspended_via_gui = false;
|
||||
dont_request_more_work = false;
|
||||
gui_urls.clear();
|
||||
|
|
|
@ -83,6 +83,7 @@ public:
|
|||
bool master_url_fetch_pending; // need to fetch and parse the master URL
|
||||
bool sched_rpc_pending; // contact scheduling server for preferences
|
||||
bool tentative; // master URL and account ID not confirmed
|
||||
bool non_cpu_intensive;
|
||||
bool suspended_via_gui;
|
||||
bool dont_request_more_work;
|
||||
|
||||
|
|
Loading…
Reference in New Issue