Re: [PATCH] Fix argument checking in sched_setaffinity

From: Linus Torvalds
Date: Sat Sep 04 2004 - 22:59:36 EST




On Sat, 4 Sep 2004, Paul Jackson wrote:
>
> > Well, historically we _have_ required sizes to match.
>
> I'm not sure what history you're looking at here, Linus.

I have my personal drugged-up history.

Take a toke, man.

IOW: You're obviously right.

> > I don't know how to sanely expose the damn things
>
> How about:
>
> $ cd /proc/sys/kernel
> $ head sizeof*
> ==> sizeof_cpumask <==
> 64
>
> ==> sizeof_nodemask <==
> 32

Well, that's so much slower and not any more obvious than just doing the
iterative few system calls that I don't really see the point other than
from a scripting standpoint, but on the other hand I can't see how you'd
use sched_setaffinity() and friends from within a script anyway, so ;)

(yes, there's perl syscalls, but then the standard "find the size" also
works fine ;)

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/