Ticket #1659: schedprio.patch

File schedprio.patch, 814 bytes (added by ajlill@…, 14 years ago)
  • programs/mythbackend/scheduler.cpp

     
    7171        pthread_t scthread;
    7272        pthread_create(&scthread, NULL, SchedulerThread, this);
    7373
    74         // Lower scheduling priority, to avoid problems with recordings.
    75         struct sched_param sp = {9 /* lower than normal */};
    76         pthread_setschedparam(scthread, SCHED_OTHER, &sp);
    7774    }
    7875}
    7976
     
    15681565void *Scheduler::SchedulerThread(void *param)
    15691566{
    15701567    Scheduler *sched = (Scheduler *)param;
     1568    // Lower scheduling priority, to avoid problems with recordings.
     1569    setpriority(PRIO_PROCESS, 0, 9);
    15711570    sched->RunScheduler();
    15721571 
    15731572    return NULL;