Commit Graph

877 Commits

Author SHA1 Message Date
David Anderson deac50f8b1 - client: implement <start_apps_manually> for Windows too
- client: check /dev/input/mice/ for idle detection;
    apparently that's replaced /dev/mouse in Linux
    (from Toby Murray)
- API: make old-style graphics compile again

svn path=/trunk/boinc/; revision=14543
2008-01-13 04:16:58 +00:00
David Anderson 2be6f8e53a - Client: add <run_apps_manually> config flag.
This is for debugging apps (currently works only in Unix).
    What it does: when running an app,
    the client does everything except actually fork/exec the app,
    i.e. it sets up the slot dir, creates shared mem segment etc.
    It then continues as if the app were actually running,
    and you can then manually run your app under a debugger
    in the slot directory.
    Note: the client won't notice the termination of your app.
- API, Unix: in situations where the timer thread wants to exit
    (e.g. it notices a missing heartbeat).
    don't directly call boinc_exit(),
    since this touches data structures that the worker thread
    may be using concurrently.
    Instead, set a flag telling the worker thread to call boinc_exit()
    (which it will do from its signal handler)
    This is an attempt to fix problems reported by Bernd;
    I haven't tested it.
- scheduler: add config flag for uploading usage data
- web: show account key and weak account key on user page
- added some code for multithread support (not finished)

api/
    boinc_api.C


svn path=/trunk/boinc/; revision=14542
2008-01-13 00:12:14 +00:00
David Anderson d47c5c1e2f - API, Unix: fix bug where boinc_sleep() hangs forever.
This was because SIGALRM always interrupts sleep()
    and keeps boinc_sleep() stuck in its while loop.
    Solution: change boinc_sleep() so that it works even if
    rapid signals (e.g. interval timer) are happening
- API: remove deprecated graphics files from Makefile.
    Old-style graphics are no longer supported.
- web: add empty show_user_donations_private() to donations.inc

svn path=/trunk/boinc/; revision=14513
2008-01-09 17:32:02 +00:00
David Anderson d9a663a42e - API: call update_app_progress() only from the timer thread.
Previously it was called from both timer and worker thread,
    with no synchronization.  Bad.
    boinc_finish(): sleep for 2 seconds, enough to ensure that
    the timer thread sends the final messages.
- API: a compile flag GETRUSAGE_IN_TIMER_THREAD selects
    how to get CPU time; by default set only for Mac OS X
- scheduler: cap #CPUs scaling for <max_wus_per_host> at 8

svn path=/trunk/boinc/; revision=14495
2008-01-08 18:58:44 +00:00
David Anderson ade36217d2 - API: fix to changeset 14462: I put the getrusage() in the wrong place
svn path=/trunk/boinc/; revision=14484
2008-01-07 23:10:17 +00:00
David Anderson 4680b446ce - API: on Mac, call getrusage() from timer thread
(since calling it from worker thread causes crashes).
    On Linux, call getrusage() from the worker thread
    (since calling it from the timer thread returns zero on some systems).
- stripcharts: make it work even if Perl is not in path (from Eric Myers)

svn path=/trunk/boinc/; revision=14462
2008-01-03 20:43:48 +00:00
David Anderson 9248b47032 - API: check for messages from client 10X a second;
this will allow smoother CPU throttling
- delete_file: bug fixes (from Nicolas Alvarez).  Fixes #78

svn path=/trunk/boinc/; revision=14434
2007-12-21 20:57:48 +00:00
David Anderson b42c68e5dd - API: switch back to structure where the worker thread
calls getrusage() in a signal handler to find its CPU time.
    Apparently there are some kernels and/or thread libraries
    where getrusage() does NOT return the total CPU time of
    all threads in the process,
    so in these cases calling it from the timer thread doesn't work.
    
    This was originally changed because of concerns that
    calling getrusage() in a signal handler was dangerous;
    we'll see if any problems re-emerge.

    The alternative of reading /proc/PID/stats doesn't seem viable;
    format may not be standardized.

svn path=/trunk/boinc/; revision=14433
2007-12-21 19:23:22 +00:00
David Anderson 91936bad72 svn path=/trunk/boinc/; revision=14328 2007-11-30 04:14:48 +00:00
David Anderson 74c2782624 - API: code cleanup
removed references to "graphics thread"
    removed HANDLE timer_quit_event
    removed enable_heartbeat/disable_heartbeat messages
        (not sure what the ideas was, but no longer exists)
    removed heartbeat_active flag (use options.check_heartbeat instead)
    read heartbeat-channel messages even if heartbeat disabled
        (since we use that channel for WSS messages too)
- client: remove ACTIVE_TASK::thread_handle (not used)

svn path=/trunk/boinc/; revision=14323
2007-11-29 19:48:04 +00:00
David Anderson b54abc426b - API graphics: changes to REDUCED_ARRAY to support new S@h graphics
- API: fix format codes in stack trace printf

svn path=/trunk/boinc/; revision=14309
2007-11-27 19:28:57 +00:00
Charlie Fenton f5114ac1c5 Mac: Add 64-bit Intel support to Client and libraries.
svn path=/trunk/boinc/; revision=14225
2007-11-16 13:27:35 +00:00
David Anderson 785457ce35 - API: in update_app_progress(), use %e instead of %f everywhere;
this limits the length of the generated string
    ~12 chars even for big/small numbers.
    Also reduce buffer size from 8000 to 256;
    default thread stack size might not accommodate 8000 + extra.

svn path=/trunk/boinc/; revision=14112
2007-11-07 18:53:36 +00:00
David Anderson f46a06305d - user web:
- changed Private Messages interface so that you see
        all your messages on one page,
        and remove various redundant links
        (like the Inbox link on the Inbox page)
    - changed links to buttons for moderator functions

svn path=/trunk/boinc/; revision=14019
2007-11-01 23:04:39 +00:00
David Anderson dbedc0cd72 - API: compile fix for systems without strlcat()
svn path=/trunk/boinc/; revision=14012
2007-10-31 20:52:25 +00:00
David Anderson d43c0e1786 - API: when creating message strings for CPU time etc.,
use strlcat() instead of strcat().
    Einstein@home has seen some SEGVs in this function.
    I suspect that it's getting 1e304-type values
    (why? possible bugs in getrusage-related code, still)
    and that these cause long strings that overflow the message buffer.

svn path=/trunk/boinc/; revision=13999
2007-10-30 23:03:21 +00:00
Rom Walton 23609b858b - DIAG: Remove references to diagnostics_set_thread_name().
api/
        boinc_api.C
        windows_opengl.C
    lib/
        diagnostics.h
        diagnostics_win.C

svn path=/trunk/boinc/; revision=13956
2007-10-24 23:49:52 +00:00
David Anderson 7c32018889 - API: fixes for SETI@home
svn path=/trunk/boinc/; revision=13930
2007-10-22 23:12:42 +00:00
David Anderson 615e108441 - API: fix bug introduced in 13696 causing no graphics on Linux
svn path=/trunk/boinc/; revision=13922
2007-10-22 03:15:51 +00:00
Charlie Fenton 2ed89c4c65 API, Unix: call getrusage() from inside boinc_worker_thread_cpu_time() and make worker_thread_ru a local stack variable to avoid potential problems with thread preemption.
svn path=/trunk/boinc/; revision=13880
2007-10-17 19:53:51 +00:00
Charlie Fenton 50c2ab3847 Win V6 SCR compatibility: save, restore gfx window size & position.
svn path=/trunk/boinc/; revision=13856
2007-10-17 00:53:15 +00:00
David Anderson b079d40cb9 - API, Unix: call getrusage() from the timer thread,
not the worker signal handler.
    There's no reason to call it from the signal handler -
    it returns the CPU for the entire process, not the calling thread.
    And it may be asynch-signal-handler-unsafe.
- API: comment out checks for bad CPU times.
    I don't think this is needed now, and in some cases it's wrong
    (multi-threaded apps can accumulate CPU faster than real time)
- API, Unix: in boinc_calling_thread_cpu_time(), don't retry getrusage().
- Bossa: switch to better class structure (suggested by Nicolas Alvarez).
    Haven't switched to mysqli yet, but will later.
    Also various other Bossa fixes

svn path=/trunk/boinc/; revision=13855
2007-10-16 23:02:13 +00:00
David Anderson 452ae11337 - API: handle wacky values in worker_thread_ru:
- check for infinity/NaN
    - check for CPU time decreasing
    - check for CPU time increasing faster than real time
    ... and deal with each of these in a hopefully reasonable way

svn path=/trunk/boinc/; revision=13847
2007-10-12 23:12:50 +00:00
David Anderson 028544e184 - API: get rid of getrusage_mutex to synchronize calls to getrusage()
and access to worker_thread_ru.
    This was being used in the worker signal handler,
    which is bad because pthread_mutex_lock() can allocate memory.
    I don't think this matters; at worst we might get
    CPU times off by < 1 sec.

svn path=/trunk/boinc/; revision=13844
2007-10-12 19:28:30 +00:00
Charlie Fenton 8396e06fc0 Mac V5 GFX API: Fix old zombie process bug (I hope). getPathToThisApp() should call pclose(), not fclose().
svn path=/trunk/boinc/; revision=13840
2007-10-12 06:22:58 +00:00
Charlie Fenton 3d4f4c1780 Mac V5 GFX API: In setMacPList(), if resource already exists, don't call getPathToThisApp() because it leaves a zombie process.
svn path=/trunk/boinc/; revision=13828
2007-10-11 01:41:33 +00:00
Frank Thomas fbcfeaf456 - Removed the svn:executable property from files that should not be executable,
like source code and text files. I skipped to check most files in html/
  and mac_*/ though.
- Added svn:executable to tools/watch_tcp because it has a shebang.


svn path=/trunk/boinc/; revision=13819
2007-10-10 09:25:40 +00:00
David Anderson 25a92389b1 - updated svn ignore properties; deleted some .cvsignore files
svn path=/trunk/boinc/; revision=13813
2007-10-09 18:00:06 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
Charlie Fenton 03b5c3e3b0 API V6 GFX: Initialize boinc_max_fps = 30.
svn path=/trunk/boinc/; revision=13778
2007-10-04 21:58:56 +00:00
Charlie Fenton 07d83c89b7 graphics API: Write changed window size only after it has stopped changing
svn path=/trunk/boinc/; revision=13714
2007-09-29 01:30:32 +00:00
Charlie Fenton 71255d3194 graphics API: Write changed window size only after it has stopped changing.
svn path=/trunk/boinc/; revision=13713
2007-09-29 01:20:42 +00:00
Charlie Fenton d568c3c260 Restore gfx window size & pos when relaunching. Mac: let gfx app icons appear in Dock.
svn path=/trunk/boinc/; revision=13698
2007-09-28 11:32:05 +00:00
David Anderson ab09ba8834 - graphics API: redo the code for backwards compatibility with V5 so that
at most one regular and one full-screen graphics window can be open,
    and a "hide" message kills the full-screen window if one exists,
    else a regular window.
    Keep track of the PIDs separately for regular and full-screen.
    Also, don't send a "hide" ack if we don't do graphics.

svn path=/trunk/boinc/; revision=13697
2007-09-28 04:23:34 +00:00
Charlie Fenton e680c9a9a1 Mac V6 GFX: add setMacPList() call
svn path=/trunk/boinc/; revision=13696
2007-09-28 02:06:30 +00:00
Charlie Fenton 992fdc08a2 Mac V6 GFX: add setMacPList() call
svn path=/trunk/boinc/; revision=13694
2007-09-27 23:48:07 +00:00
Charlie Fenton 8103f74d3e API: fix 2 bugs in new compatibility code for handling V5 graphics messages in a V5 app
svn path=/trunk/boinc/; revision=13681
2007-09-27 13:09:48 +00:00
David Anderson 7bdacec895 - API: debug the code for handling V5 graphics messages
in a V6 app (and launching/killing the graphics app)
	- API: start timer thread even if in standalone mode
		(needed to get timer callbacks for V6 graphics)
	- API: remove BOINCSetForegroundWindow stuff
	- API: call DestroyWindow instead of boinc_exit() in WM_CLOSE.
		boinc_exit() is the wrong thing to call - e.g. it tries to delete
		the lock file, resulting in a 5-sec delay on exit

svn path=/trunk/boinc/; revision=13679
2007-09-27 03:34:27 +00:00
David Anderson 0a48da269d - API: initialize backwards_compatible_graphics to true.
NOTE: as of this checkin, applications built with the API
code in the trunk are assumed to do V6-type graphics.
If your app doesn't, then you must set
backwards_compatible_graphics to false
(and use boinc_init_graphics_options())


svn path=/trunk/boinc/; revision=13675
2007-09-26 17:06:50 +00:00
Charlie Fenton e8a4acda63 V6 screensaver shows graphics for both V5 and V6 applications.
svn path=/trunk/boinc/; revision=13670
2007-09-26 10:17:43 +00:00
Charlie Fenton 2713f5662d Mac/Linux/UNIX: V6 apps uses shmget() to run with V5 clients
svn path=/trunk/boinc/; revision=13669
2007-09-26 10:17:11 +00:00
David Anderson f1f5930579 - client: removed everything related to screensaver
(deciding which app to use, implementing blanking interval, etc.)
    This logic is all now in the screensaver itself.
- GUI RPC: removed get/set screensaver mode RPCs
- API: added a "backwards_compatible_graphics" flag to BOINC_OPTIONS.
    V6 apps should set this.
    If set, the runtime library checks for graphics messages
    from the client, and launches/kills the graphics app (if any).
    The app will then work graphically with pre-V6 clients.
- removed some old files

svn path=/trunk/boinc/; revision=13651
2007-09-25 16:04:45 +00:00
David Anderson bc5b979afb - Added new script "update_versions_v6"; use this instead of
update_versions to add version 6 apps.
    It looks for API_VERSION string in main executable,
    adds the API version to the app_version XML,
    and sets min_core_version to 6 for version 6+ apps
- API: include API_VERSION string
- convert tabs to spaces here and there
- scheduler: parse unused elements in <net_stats>
- ops/show_log.php: if no URL args, just show form (fixes #415)
- client: parse and store api_version (not used yet)

svn path=/trunk/boinc/; revision=13627
2007-09-21 18:10:54 +00:00
Rom Walton 4ab9cb6b0c Quick Updates
svn path=/trunk/boinc/; revision=13596
2007-09-17 18:11:23 +00:00
David Anderson 3204081982 - API: embed the string API_VERSION_N.N.N in libboinc.a
(for v6)
- client: performance tweak for CPU sched
- client: fix /proc/cpuinfo parsing for linux 2.6.23, powerPC
    fixes #410


svn path=/trunk/boinc/; revision=13593
2007-09-17 14:03:44 +00:00
David Anderson 34a31a2827 - API: don't start timer thread (or install signal handler on Unix)
if running standalone


svn path=/trunk/boinc/; revision=13577
2007-09-12 13:37:06 +00:00
Reinhard Prix b42927889c - initialize local 'struct sigaction' variable to zero ({0}) in xwin_graphics_event_loop()
svn path=/trunk/boinc/; revision=13566
2007-09-11 17:40:03 +00:00
David Anderson fbfd793489 - API: initialize sigaction struct in X graphics code
svn path=/trunk/boinc/; revision=13558
2007-09-09 21:09:07 +00:00
Charlie Fenton 9c939288df make shared memory using memory mapped files more robust
svn path=/trunk/boinc/; revision=13534
2007-09-04 07:41:25 +00:00
Charlie Fenton d269036df3 V6 GFX: Fix bug on OS 10.3.9
svn path=/trunk/boinc/; revision=13532
2007-09-04 07:40:18 +00:00