mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Small changes to make pthread_utils.cc buildable again with MSVC
This commit is contained in:
parent
44b2377e72
commit
07c79ce92c
1 changed files with 3 additions and 1 deletions
|
|
@ -43,6 +43,8 @@ DECLARE_DEFAULT_COMPARISONS (pthread_t) // Needed for 'DECLARE_DEFAULT_COMPARISO
|
||||||
// if the type of object being contained has no appropriate comparison operators
|
// if the type of object being contained has no appropriate comparison operators
|
||||||
// defined (specifically, if operators '<' and '==' are undefined). This seems
|
// defined (specifically, if operators '<' and '==' are undefined). This seems
|
||||||
// to be the case with ptw32 'pthread_t' which is a simple struct.
|
// to be the case with ptw32 'pthread_t' which is a simple struct.
|
||||||
|
|
||||||
|
#define pthread_gethandle pthread_getw32threadhandle_np
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
@ -440,7 +442,7 @@ pbd_set_thread_priority (pthread_t thread, int policy, int priority)
|
||||||
DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Change '%1' to policy = %2 priority = %3\n", pthread_name(), policy, param.sched_priority));
|
DEBUG_TRACE (PBD::DEBUG::Threads, string_compose ("Change '%1' to policy = %2 priority = %3\n", pthread_name(), policy, param.sched_priority));
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
if (thread && param.sched_priority >= 12) {
|
if (is_pthread_active (thread) && param.sched_priority >= 12) {
|
||||||
if (set_win_set_realtime_policy (thread, param.sched_priority)) {
|
if (set_win_set_realtime_policy (thread, param.sched_priority)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue