mirror of https://github.com/BOINC/boinc.git
Merge pull request #5754 from BOINC/vko_add_wsl_plan_class
[sched] add wsl plan class
This commit is contained in:
commit
0f9fe79ff3
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2023 University of California
|
||||
// https://boinc.berkeley.edu
|
||||
// Copyright (C) 2024 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -543,6 +543,13 @@ bool PLAN_CLASS_SPEC::check(
|
|||
}
|
||||
}
|
||||
|
||||
if (wsl) {
|
||||
if (!sreq.host.wsl_available) {
|
||||
add_no_work_message("WSL is not available on this host");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// project-specific preference
|
||||
//
|
||||
if (have_project_prefs_regex && strlen(project_prefs_tag)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2023 University of California
|
||||
// https://boinc.berkeley.edu
|
||||
// Copyright (C) 2024 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -32,6 +32,7 @@ struct PLAN_CLASS_SPEC {
|
|||
bool cal;
|
||||
bool opencl;
|
||||
bool virtualbox;
|
||||
bool wsl;
|
||||
bool is64bit;
|
||||
std::vector<std::string> cpu_features;
|
||||
double min_ncpus;
|
||||
|
|
|
@ -120,4 +120,8 @@
|
|||
<min_ncpus> 2 </min_ncpus>
|
||||
<max_threads> 2 </max_threads>
|
||||
</plan_class>
|
||||
<plan_class>
|
||||
<name> wsl </name>
|
||||
<wsl/>
|
||||
</plan_class>
|
||||
</plan_classes>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// https://boinc.berkeley.edu
|
||||
// Copyright (C) 2024 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -959,6 +959,11 @@ static inline bool app_plan_vbox(
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool app_plan_wsl(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
|
||||
// no additional checks at the moment, just return true
|
||||
return true;
|
||||
}
|
||||
|
||||
// app planning function.
|
||||
// See https://github.com/BOINC/boinc/wiki/AppPlan
|
||||
//
|
||||
|
@ -1019,6 +1024,8 @@ bool app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu, const W
|
|||
return app_plan_sse3(sreq, hu);
|
||||
} else if (strstr(plan_class, "vbox")) {
|
||||
return app_plan_vbox(sreq, plan_class, hu);
|
||||
} else if (strstr(plan_class, "wsl")) {
|
||||
return app_plan_wsl(sreq, plan_class, hu);
|
||||
}
|
||||
log_messages.printf(MSG_CRITICAL,
|
||||
"Unknown plan class: %s\n", plan_class
|
||||
|
|
Loading…
Reference in New Issue