Help with making stuff compile on non-Linux

Alex Merry huntedhacker at tiscali.co.uk
Tue Jul 22 22:06:23 BST 2008


On Tuesday 22 July 2008 21:25:08 Adriaan de Groot wrote:
> I'd need more documentation about the intent of using the syscall interface
> there; while I have access to a Mandriva machine, I'd really prefer not to
> go reading through system headers.

It's so new that glibc doesn't have a nice wrapper for the syscall yet.  It 
would be called something like ioprio_set() if it did.

> setpriority(3c) exists on Solaris, with the same semantics (it's a standard
> interface).
>
> sched_setscheduler(3rt) exists on Solaris, with the same semantics (it's a
> standard interface, apparently). SCHED_BATCH is not a POSIX scheduling
> policy; it is not defined in Solaris.
>
> setpriority(2) exists on FreeBSD 6-STABLE. I do not know about 7-STABLE or
> 8- CURRENT, but since it's standard I would assume so.
>
> sched_setscheduler(2) exists on FreeBSD 6-STABLE. Same comment for later
> version support. Same comment for SCHED_BATCH as for Solaris.

I think that lowerIOPriority() should be ifdef'd out (ie: just return false) 
if SYS_ioprio_set is not defined, and lowerSchedulingPriority if SCHED_BATCH 
is not defined.  That should fail gracefully at compile time, without having 
to work out what version of what OS supports it.

In particular, lowerSchedulingPriority() should magically work on other 
systems if they start supporting SCHED_BATCH.

Alex


-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org





More information about the kde-core-devel mailing list