diff --git a/api/boinc_api.C b/api/boinc_api.C
index d633c4ca1b..9f0f47b2de 100644
--- a/api/boinc_api.C
+++ b/api/boinc_api.C
@@ -56,6 +56,7 @@ 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 pthread_t timer_thread_handle;
static APP_INIT_DATA aid;
static FILE_LOCK file_lock;
APP_CLIENT_SHM* app_client_shm = 0;
@@ -594,6 +595,17 @@ static void worker_timer(int /*a*/) {
#endif
}
+#ifndef _USECONDS_T_DECLARED
+typedef unsigned int useconds_t;
+#endif
+
+void * timer_thread(void *) {
+ while(1) {
+ usleep((useconds_t)(TIMER_PERIOD*1000000));
+ worker_timer(0);
+ }
+ /*NOTREACHED*/
+}
// set up a periodic timer interrupt for the worker thread.
// This is called only and always by the worker thread
@@ -626,6 +638,12 @@ int set_worker_timer() {
// lower our priority here
//
SetThreadPriority(worker_thread_handle, THREAD_PRIORITY_IDLE);
+#else
+#if 1
+ retval = pthread_create(&timer_thread_handle, NULL, timer_thread, NULL);
+ if (retval) {
+ perror("set_worker_timer(): pthread_create(): %d");
+ }
#else
struct sigaction sa;
itimerval value;
@@ -643,6 +661,7 @@ int set_worker_timer() {
if (retval) {
perror("boinc set_worker_timer() setitimer");
}
+#endif
#endif
return retval;
}
diff --git a/checkin_notes b/checkin_notes
index 5aa5b9136b..9f41df913d 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -6858,3 +6858,16 @@ Charlie 21 may 2005
postupgrade
PostInstall.cpp
+David 21 May 2005
+ - API: there seem to be problems with the user of timer signals
+ in the BOINC API (Unix version).
+ On some platforms the signals are delivered to both
+ the worker and graphics thread,
+ and they can deadlock on something down in _vprintf().
+
+ Rather than try to sort this out,
+ we'll switch to using a separate thread instead of signals.
+ (from J.R. Oldroyd)
+
+ api/
+ boinc_api.C
diff --git a/doc/download.php b/doc/download.php
index 907e090d03..bddbf65aef 100755
--- a/doc/download.php
+++ b/doc/download.php
@@ -21,7 +21,7 @@ function show_detail($v) {
$path = "dl/$file";
$url = "http://boinc.berkeley.edu/$path";
$dlink = "$file";
- $md = md5_file($path);
+ //$md = md5_file($path);
$s = number_format(filesize($path)/1000000, 2);
$date = $v["date"];
$type = $v["type"];
@@ -33,7 +33,7 @@ function show_detail($v) {
dl_item("Version number", $num);
dl_item("Release date", $date);
dl_item("Installer type", $type);
- dl_item("MD5 checksum of download file", $md);
+ //dl_item("MD5 checksum of download file", $md);
if ($features) {
dl_item ("New features", $features);
}
@@ -66,7 +66,7 @@ function show_version_xml($v, $long_name) {
$path = "dl/$file";
$url = "http://boinc.berkeley.edu/$path";
$dlink = "$file";
- $md = md5_file($path);
+ //$md = md5_file($path);
$s = number_format(filesize($path)/1000000, 2);
$date = $v["date"];
$type = $v["type"];
@@ -83,12 +83,12 @@ function show_version_xml($v, $long_name) {
$url
$file
$s
- $md
$type
$features
$bugs
";
+// $md
}
function show_version($pname, $i, $v) {