我写了使用sched_setalgindity的代码, 需要2.5.8内或以后。 我一直在尝试弄清楚这些事情是否可行:
- Systems with older kernels to compile this gracefully, perhaps just ignoring that code segment entirely.
- If I send someone with an older kernel a compiled binary, it will step over this function or simply print a warning.
我猜我的问题是,你如何安全地使用新的内核函数,而不在使用旧系统时中断整个应用程序?