diff options
Diffstat (limited to 'pjlib/src/pj/os_core_unix.c')
-rw-r--r-- | pjlib/src/pj/os_core_unix.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index 00094cf3..c46fbf09 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -308,7 +308,14 @@ PJ_DEF(int) pj_thread_get_prio_min(pj_thread_t *thread) if (rc != 0) return -1; +#if defined _POSIX_PRIORITY_SCHEDULING return sched_get_priority_min(policy); +#elif defined __OpenBSD__ + return 0; +#else + pj_assert("pj_thread_get_prio_min() not supported!"); + return 0; +#endif } @@ -325,7 +332,14 @@ PJ_DEF(int) pj_thread_get_prio_max(pj_thread_t *thread) if (rc != 0) return -1; +#if defined _POSIX_PRIORITY_SCHEDULING return sched_get_priority_max(policy); +#elif defined __OpenBSD__ + return 31; +#else + pj_assert("pj_thread_get_prio_max() not supported!"); + return 0; +#endif } |