- API: add "normal_thread_priority" to BOINC_OPTIONS.

If set, the worker thread runs at normal priority on Win.
    May be useful for CUDA apps.

svn path=/trunk/boinc/; revision=16705
This commit is contained in:
David Anderson 2008-12-17 00:49:50 +00:00
parent 8c7d6dc489
commit e7270c7f96
3 changed files with 17 additions and 3 deletions

View File

@ -989,9 +989,11 @@ int start_timer_thread() {
return errno;
}
if (!options.normal_thread_priority) {
// lower our (worker thread) priority
//
SetThreadPriority(worker_thread_handle, THREAD_PRIORITY_IDLE);
}
#else
pthread_attr_t thread_attrs;
pthread_attr_init(&thread_attrs);

View File

@ -53,6 +53,9 @@ typedef struct BOINC_OPTIONS {
int backwards_compatible_graphics;
// V6 apps should set this so that "Show Graphics" will work
// with pre-V6 clients
int normal_thread_priority;
// run app at normal thread priority on Win.
// (default is idle priority)
} BOINC_OPTIONS;
typedef struct BOINC_STATUS {
@ -145,6 +148,7 @@ inline void boinc_options_defaults(BOINC_OPTIONS& b) {
b.direct_process_action = 1;
b.worker_thread_stack_size = 0;
b.backwards_compatible_graphics = 1;
b.normal_thread_priority = 0;
}

View File

@ -10180,3 +10180,11 @@ David 16 Dec 2008
db_conn.inc
ops/
autolock.php
David 16 Dec 2008
- API: add "normal_thread_priority" to BOINC_OPTIONS.
If set, the worker thread runs at normal priority on Win.
May be useful for CUDA apps.
api/
boinc_api.cpp,h