mirror of https://github.com/BOINC/boinc.git
- 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:
parent
8c7d6dc489
commit
e7270c7f96
|
@ -989,9 +989,11 @@ int start_timer_thread() {
|
|||
return errno;
|
||||
}
|
||||
|
||||
// lower our (worker thread) priority
|
||||
//
|
||||
SetThreadPriority(worker_thread_handle, THREAD_PRIORITY_IDLE);
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue