Browse Source

Tamper the scheduling priorities only when necessary.

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@741 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
sonarnerd 21 years ago
parent
commit
089cfcf15d
1 changed files with 13 additions and 5 deletions
  1. +13
    -5
      drivers/oss/oss_driver.c

+ 13
- 5
drivers/oss/oss_driver.c View File

@@ -879,12 +879,20 @@ static void *io_thread (void *param)

if (pthread_getschedparam(pthread_self(), &schedpol, &schedp) == 0)
{
schedpol = SCHED_FIFO;
schedp.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
if (pthread_setschedparam(pthread_self(), schedpol,
&schedp) != 0)
if (schedpol != SCHED_FIFO)
{
puts("oss_driver: pthread_setschedparam() failed\n");
schedpol = SCHED_FIFO;
schedp.sched_priority =
sched_get_priority_max(SCHED_FIFO) - 1;
if (pthread_setschedparam(pthread_self(), schedpol,
&schedp) != 0)
{
puts("oss_driver: pthread_setschedparam() failed\n");
}
}
else
{
puts("oss_driver: already running SCHED_FIFO; no changes\n");
}
}
else


Loading…
Cancel
Save