diff --git a/api/graphics2.h b/api/graphics2.h index b39533fc5d..1dc550410b 100644 --- a/api/graphics2.h +++ b/api/graphics2.h @@ -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*); diff --git a/api/graphics2_util.cpp b/api/graphics2_util.cpp index 387afe77c7..fd58bf7e6f 100644 --- a/api/graphics2_util.cpp +++ b/api/graphics2_util.cpp @@ -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__ diff --git a/checkin_notes b/checkin_notes index 643810ff18..8c2da06bcf 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/boinc_cmd.cpp b/client/boinc_cmd.cpp index 598c919d94..57902c7e21 100644 --- a/client/boinc_cmd.cpp +++ b/client/boinc_cmd.cpp @@ -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"; diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index a33ce2c532..1de6683751 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -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; diff --git a/client/work_fetch.h b/client/work_fetch.h index 11d4ff3b55..8ebb1afd4b 100644 --- a/client/work_fetch.h +++ b/client/work_fetch.h @@ -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*); diff --git a/html/user/get_project_config.php b/html/user/get_project_config.php index 838ecf93de..939e9f5915 100644 --- a/html/user/get_project_config.php +++ b/html/user/get_project_config.php @@ -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, "\n"); while ($p = mysql_fetch_object($result)) { + if ($p->plan_class) { + $pc = " $p->plan_class\n"; + } else { + $pc = ""; + } fwrite($f, - " \n $p->name\n $p->user_friendly_name\n \n" + " \n $p->name\n $p->user_friendly_name\n$pc \n" ); } mysql_free_result($result);