diff --git a/api/boinc_api.C b/api/boinc_api.C index d2cdf81126..fa6f3cfb49 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -450,11 +450,15 @@ static void on_timer(int a) { } } - // see if the core client has died, and we need to die too + // see if the core client has died, which means we need to die too // if (options.check_heartbeat && heartbeat_active) { - if (heartbeat_giveup_time < dtime()) { - fprintf(stderr, "No heartbeat from core client - exiting\n"); + double now = dtime(); + if (heartbeat_giveup_time < now) { + fprintf(stderr, + "No heartbeat from core client for %f sec - exiting\n", + now - (heartbeat_giveup_time - HEARTBEAT_GIVEUP_PERIOD); + ); if (options.direct_process_action) { exit(0); } else { diff --git a/checkin_notes b/checkin_notes index 255067fb3d..54a8922e3f 100755 --- a/checkin_notes +++ b/checkin_notes @@ -18313,3 +18313,18 @@ David 12 Oct 2004 user/ edit_forum_preferences_action.php edit_forum_preferences_form.php + +David 12 Oct 2004 + - API: more detailed message when do heartbeat giveup + - remove CLIENT_STATE::previous_activities_suspended + - changed work fetch policy to get T work, not 2T + - don't handle SIGTSTP and SIGCONT + + api/ + boinc_api.C + client/ + client_state.C,h + cs_scheduler.C + main.C + win/ + wingui_mainwindow.cpp diff --git a/client/client_state.C b/client/client_state.C index 0d4e622508..fd9d4cac17 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -79,7 +79,6 @@ CLIENT_STATE::CLIENT_STATE() { contacted_sched_server = false; activities_suspended = false; network_suspended = false; - previous_activities_suspended = false; core_client_major_version = BOINC_MAJOR_VERSION; core_client_minor_version = BOINC_MINOR_VERSION; platform_name = HOSTTYPE; @@ -353,7 +352,6 @@ bool CLIENT_STATE::do_something() { resume_activities(); } } - previous_activities_suspended = activities_suspended; activities_suspended = (reason != 0); // if we're doing CPU benchmarks, don't do much else diff --git a/client/client_state.h b/client/client_state.h index 2acb5c5591..59d7473b8a 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -118,9 +118,6 @@ public: int sched_retry_delay_min, sched_retry_delay_max; int pers_retry_delay_min, pers_retry_delay_max, pers_giveup; bool activities_suspended; - bool previous_activities_suspended; - // if activities were suspended in the previous check_suspend(); - // this is needed to update GUI windows after suspension and close transfers/files. bool network_suspended; bool executing_as_windows_service; bool size_overflow; diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index a5c9be4e69..fb14f360ff 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -425,7 +425,8 @@ int CLIENT_STATE::compute_work_requests() { // p->work_request = max(0.0, - (2*work_min_period - estimated_time_to_starvation) + //(2*work_min_period - estimated_time_to_starvation) + (work_min_period - estimated_time_to_starvation) * avg_proc_rate(p) ); } diff --git a/client/main.C b/client/main.C index d9a050056a..7b12bb646a 100644 --- a/client/main.C +++ b/client/main.C @@ -245,8 +245,8 @@ int boinc_main_loop(int argc, char** argv) { #ifdef SIGPWR boinc_set_signal_handler(SIGPWR, signal_handler); #endif - boinc_set_signal_handler_force(SIGTSTP, signal_handler); - boinc_set_signal_handler_force(SIGCONT, signal_handler); + //boinc_set_signal_handler_force(SIGTSTP, signal_handler); + //boinc_set_signal_handler_force(SIGCONT, signal_handler); #endif // Windows console controls diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index b5d1392af2..b099665846 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -2151,9 +2151,7 @@ void CMainWindow::OnTimer(UINT uEventID) { gstate.trunc_stderr_stdout(); } - if (!gstate.activities_suspended || !gstate.previous_activities_suspended) { - UpdateGUI(&gstate); - } + UpdateGUI(&gstate); // Start the timer again m_nGuiTimerID = SetTimer(GUI_TIMER, GUI_WAIT, (TIMERPROC) NULL); diff --git a/doc/graphics.php b/doc/graphics.php index 93d06ab9f9..0409791f9f 100644 --- a/doc/graphics.php +++ b/doc/graphics.php @@ -8,13 +8,10 @@ Graphics are displayed either in an application window or in a full-screen window (when acting as a screensaver). Applications that provide graphics must call
- void boinc_init_graphics(); + void boinc_init_graphics(void (*worker)());-at the start and -
- void boinc_finish_graphics(); --prior to exiting. +where
worker()
is the main function of your application.
+
An application can display a pre-existing image file @@ -30,17 +27,15 @@ name of the file each time.
-The main application thread is called the worker thread.
-boinc_init_graphics()
creates a second thread,
-called the graphics thread.
+boinc_init_graphics()
creates a worker thread
+that runs the main application function.
+The original thread becomes the graphics thread,
+which handles GUI events and does rendering.
The two threads communicate through application-defined
shared memory structures.
Typically these structures contain information about the computation,
which is used to generate graphics.
-
-
-
-The worker must initialize the shared data structure
+You must initialize the shared data structure
before calling boinc_init_graphics()
.
Graphical applications must supply the following functions:
@@ -50,7 +45,7 @@ Graphical applications must supply the following functions:
This will be called periodically in the graphics thread.
It should generate the current graphic.
xs
and ys
are the X and Y sizes of the window,
-and time_of_day is the relative time in seconds.
+and time_of_day
is the relative time in seconds.
The function should return true if it actually drew anything.
It can refer to the user name, CPU time etc. obtained from
boinc_get_init_data()
.