mirror of https://github.com/BOINC/boinc.git
- get_project_config.php: include plan classes in platform list;
i.e., list both win/x86 and win/x86 + NVIDIA. This will allow the manager to show which projects can use the hosts's coprocessors, and also graying out projects that require an absent coproc. - fix compile warnings svn path=/trunk/boinc/; revision=17735
This commit is contained in:
parent
85066ced1c
commit
837d3fc0a1
|
@ -31,8 +31,8 @@ extern void boinc_app_key_release(int, int);
|
|||
// Functions that the app can call
|
||||
//
|
||||
extern void boinc_graphics_loop(int argc, char** argv, const char* title=0);
|
||||
extern void* boinc_graphics_make_shmem(char*, int);
|
||||
extern void* boinc_graphics_get_shmem(char*);
|
||||
extern void* boinc_graphics_make_shmem(const char*, int);
|
||||
extern void* boinc_graphics_get_shmem(const char*);
|
||||
extern void boinc_set_windows_icon(const char* icon16,const char* icon48);
|
||||
extern void boinc_close_window_and_quit(const char*);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "graphics2.h"
|
||||
|
||||
#ifdef __EMX__
|
||||
static key_t get_shmem_name(char* prog_name) {
|
||||
static key_t get_shmem_name(const char* prog_name) {
|
||||
char cwd[256], path[256];
|
||||
boinc_getcwd(cwd);
|
||||
sprintf(path, "%s/init_data.xml", cwd);
|
||||
|
@ -43,7 +43,7 @@ static key_t get_shmem_name(char* prog_name) {
|
|||
#else
|
||||
// Unix/Linux/Mac applications always use mmap() for gfx communication
|
||||
//
|
||||
static void get_shmem_name(char* prog_name, char* shmem_name) {
|
||||
static void get_shmem_name(const char* prog_name, char* shmem_name) {
|
||||
APP_INIT_DATA aid;
|
||||
int retval = boinc_get_init_data(aid);
|
||||
if (retval) aid.slot = 0;
|
||||
|
@ -51,7 +51,7 @@ static void get_shmem_name(char* prog_name, char* shmem_name) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void* boinc_graphics_make_shmem(char* prog_name, int size) {
|
||||
void* boinc_graphics_make_shmem(const char* prog_name, int size) {
|
||||
#ifdef _WIN32
|
||||
HANDLE shmem_handle;
|
||||
char shmem_name[256];
|
||||
|
@ -80,7 +80,7 @@ void* boinc_graphics_make_shmem(char* prog_name, int size) {
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
void* boinc_graphics_get_shmem(char* prog_name) {
|
||||
void* boinc_graphics_get_shmem(const char* prog_name) {
|
||||
HANDLE shmem_handle;
|
||||
char shmem_name[256];
|
||||
void* p;
|
||||
|
@ -92,7 +92,7 @@ void* boinc_graphics_get_shmem(char* prog_name) {
|
|||
return p;
|
||||
}
|
||||
#else
|
||||
void* boinc_graphics_get_shmem(char* prog_name) {
|
||||
void* boinc_graphics_get_shmem(const char* prog_name) {
|
||||
void* p;
|
||||
int retval;
|
||||
#ifdef __EMX__
|
||||
|
|
|
@ -3580,3 +3580,20 @@ Rom 2 Apr 2009
|
|||
|
||||
clientscr/
|
||||
screensaver_win.cpp, .h
|
||||
|
||||
David 3 Apr 2009
|
||||
- get_project_config.php: include plan classes in platform list;
|
||||
i.e., list both win/x86 and win/x86 + NVIDIA.
|
||||
This will allow the manager to show which projects can
|
||||
use the hosts's coprocessors,
|
||||
and also graying out projects that require an absent coproc.
|
||||
- fix compile warnings
|
||||
|
||||
api/
|
||||
graphics2.h
|
||||
graphics2_util.cpp
|
||||
client/
|
||||
boinc_cmd.cpp
|
||||
work_fetch.cpp,h
|
||||
html/user/
|
||||
get_project_config.php
|
||||
|
|
|
@ -122,7 +122,7 @@ char* next_arg(int argc, char** argv, int& i) {
|
|||
return argv[i++];
|
||||
}
|
||||
|
||||
char* prio_name(int prio) {
|
||||
const char* prio_name(int prio) {
|
||||
switch (prio) {
|
||||
case 1: return "low";
|
||||
case 2: return "medium";
|
||||
|
|
|
@ -42,7 +42,7 @@ WORK_FETCH work_fetch;
|
|||
// so if the project develops a GPU app,
|
||||
// we'll find out about it within a day.
|
||||
|
||||
static inline char* rsc_name(int t) {
|
||||
static inline const char* rsc_name(int t) {
|
||||
switch (t) {
|
||||
case RSC_TYPE_CPU: return "CPU";
|
||||
case RSC_TYPE_CUDA: return "CUDA";
|
||||
|
@ -286,7 +286,7 @@ void WORK_FETCH::zero_debts() {
|
|||
}
|
||||
}
|
||||
|
||||
void RSC_WORK_FETCH::print_state(char* name) {
|
||||
void RSC_WORK_FETCH::print_state(const char* name) {
|
||||
msg_printf(0, MSG_INFO,
|
||||
"[wfd] %s: shortfall %.2f nidle %.2f est. delay %.2f RS fetchable %.2f runnable %.2f",
|
||||
name,
|
||||
|
@ -651,8 +651,8 @@ bool RSC_PROJECT_WORK_FETCH::debt_eligible(PROJECT* p, RSC_WORK_FETCH& rwf) {
|
|||
|
||||
// The last time we asked for work we didn't get any,
|
||||
// but it's been a while since we asked.
|
||||
// In this case, accumulate debt until we reach (around) zero,
|
||||
// but then stop.
|
||||
// In this case, accumulate debt until we reach (around) zero, then stop.
|
||||
//
|
||||
if (backoff_interval == MAX_BACKOFF_INTERVAL) {
|
||||
if (debt > -rwf.ninstances*DEBT_ADJUST_PERIOD) {
|
||||
return false;
|
||||
|
@ -740,7 +740,7 @@ void WORK_FETCH::init() {
|
|||
}
|
||||
}
|
||||
|
||||
void RSC_PROJECT_WORK_FETCH::backoff(PROJECT* p, char* name) {
|
||||
void RSC_PROJECT_WORK_FETCH::backoff(PROJECT* p, const char* name) {
|
||||
if (backoff_interval) {
|
||||
backoff_interval *= 2;
|
||||
if (backoff_interval > MAX_BACKOFF_INTERVAL) backoff_interval = MAX_BACKOFF_INTERVAL;
|
||||
|
|
|
@ -72,7 +72,7 @@ struct RSC_PROJECT_WORK_FETCH {
|
|||
|
||||
bool may_have_work;
|
||||
bool compute_may_have_work();
|
||||
void backoff(PROJECT*, char*);
|
||||
void backoff(PROJECT*, const char*);
|
||||
void rr_init();
|
||||
void clear_backoff() {
|
||||
backoff_time = 0;
|
||||
|
@ -123,7 +123,7 @@ struct RSC_WORK_FETCH {
|
|||
void accumulate_debt();
|
||||
RSC_PROJECT_WORK_FETCH& project_state(PROJECT*);
|
||||
void update_debts();
|
||||
void print_state(char*);
|
||||
void print_state(const char*);
|
||||
void clear_request();
|
||||
void set_request(PROJECT*, double);
|
||||
double share_request(PROJECT*);
|
||||
|
|
|
@ -34,13 +34,18 @@ function show_platforms() {
|
|||
require_once("../inc/db.inc");
|
||||
$retval = db_init_aux(true);
|
||||
if (!$retval) {
|
||||
$query = 'select name, user_friendly_name from platform, app_version where app_version.platformid = platform.id and app_version.deprecated=0 group by name';
|
||||
$query = 'select name, user_friendly_name, plan_class from platform, app_version where app_version.platformid = platform.id and app_version.deprecated=0 group by name, plan_class';
|
||||
$result = mysql_query($query);
|
||||
$f = fopen($path, "w");
|
||||
fwrite($f, "<platforms>\n");
|
||||
while ($p = mysql_fetch_object($result)) {
|
||||
if ($p->plan_class) {
|
||||
$pc = " <plan_class>$p->plan_class</plan_class>\n";
|
||||
} else {
|
||||
$pc = "";
|
||||
}
|
||||
fwrite($f,
|
||||
" <platform>\n <platform_name>$p->name</platform_name>\n <user_friendly_name>$p->user_friendly_name</user_friendly_name>\n </platform>\n"
|
||||
" <platform>\n <platform_name>$p->name</platform_name>\n <user_friendly_name>$p->user_friendly_name</user_friendly_name>\n$pc </platform>\n"
|
||||
);
|
||||
}
|
||||
mysql_free_result($result);
|
||||
|
|
Loading…
Reference in New Issue