1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Cope with older linux kernel headers that don't have the newer scheduling policies defined.

This commit is contained in:
ckolivas 2011-06-14 14:09:10 +10:00 committed by Con Kolivas
parent 0a8ac14c9e
commit 51817422fc

View File

@ -40,8 +40,12 @@ static inline void drop_policy(void)
{
struct sched_param param;
#ifdef SCHED_IDLE
if (unlikely(sched_setscheduler(0, SCHED_IDLE, &param) == -1))
#endif
#ifdef SCHED_BATCH
sched_setscheduler(0, SCHED_BATCH, &param);
#endif
}
static inline void affine_to_cpu(int id, int cpu)