From 03ce38fac856c099802acdbb1ea5372b95b7f42c Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Wed, 16 Jun 2004 12:07:01 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3603 --- api/boinc_api.C | 64 ++++++++++++++++++++++++------------------------- checkin_notes | 10 +++++++- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/api/boinc_api.C b/api/boinc_api.C index e1242b91af..1b8aa721fd 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -59,47 +59,47 @@ using namespace std; // Unless otherwise noted, "CPU time" refers to the sum over all episodes // (not counting the part after the last checkpoint in an episode). -static APP_INIT_DATA aid; -APP_CLIENT_SHM *app_client_shm=0; -static double timer_period = 1.0; // period of API timer - // This determines the resolution of fraction done and CPU time reporting - // to the core client, and of checkpoint enabling. - // It doesn't influence graphics, so 1 sec is enough. -static double time_until_checkpoint; - // countdown timer until enable checkpoint -static double time_until_fraction_done_update; - // countdown timer until report fraction done to core -static double fraction_done; -static double last_checkpoint_cpu_time; -static bool ready_to_checkpoint = false; -static bool this_process_active; -static bool time_to_quit = false; -static double last_wu_cpu_time; -static bool standalone = false; -static double initial_wu_cpu_time; -static bool have_new_trickle_up = false; +static APP_INIT_DATA aid; +APP_CLIENT_SHM *app_client_shm = 0; +static double timer_period = 1.0; // period of API timer +// This determines the resolution of fraction done and CPU time reporting +// to the core client, and of checkpoint enabling. +// It doesn't influence graphics, so 1 sec is enough. +static double time_until_checkpoint; +// countdown timer until enable checkpoint +static double time_until_fraction_done_update; +// countdown timer until report fraction done to core +static double fraction_done; +static double last_checkpoint_cpu_time; +static bool ready_to_checkpoint = false; +static bool this_process_active; +static bool time_to_quit = false; +static double last_wu_cpu_time; +static bool standalone = false; +static double initial_wu_cpu_time; +static bool have_new_trickle_up = false; #ifdef _WIN32 -HANDLE hErrorNotification; -HANDLE hQuitRequest; -HANDLE hSuspendRequest; -HANDLE hResumeRequest; -HANDLE hSharedMem; -HANDLE worker_thread_handle; -MMRESULT timer_id; +HANDLE hErrorNotification; +HANDLE hQuitRequest; +HANDLE hSuspendRequest; +HANDLE hResumeRequest; +HANDLE hSharedMem; +HANDLE worker_thread_handle; +MMRESULT timer_id; #endif -static int setup_shared_mem(); -static void cleanup_shared_mem(); -static int update_app_progress(double cpu_t, double cp_cpu_t, double ws_t); -static int set_timer(double period); +static int setup_shared_mem(); +static void cleanup_shared_mem(); +static int update_app_progress(double cpu_t, double cp_cpu_t, double ws_t); +static int set_timer(double period); int boinc_init(bool standalone_ /* = false */) { FILE* f; int retval; #ifdef _WIN32 - DuplicateHandle( + DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), @@ -358,7 +358,7 @@ static int setup_shared_mem() { fprintf(stderr, "Standalone mode, so not using shared memory.\n"); return 0; } - app_client_shm = new APP_CLIENT_SHM; + app_client_shm = new APP_CLIENT_SHM; #ifdef _WIN32 char buf[256]; diff --git a/checkin_notes b/checkin_notes index 3396bb0555..6ece5d7ae6 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13654,11 +13654,19 @@ Daniel 15 June 2004 Karl 2004-06-16 - Compile fixes + - Removed windows MSVC-specific pre-compiled header stuff from API + headers and modules, since these are compiled/included by external + projects and do not use the same stdafx.h. lib/ app_ipc.h - - Return value fixes + api/ + boinc_api.h + boinc_api.C + + + - Fortran wrapper: Return value fixes api/ boinc_api_fortran.C