>
> the attached set-affinity-A1 patch is relative to the scheduler
> fixes/cleanups in 2.4.15-pre9. It implements the following two
> new system calls:
>
> asmlinkage int sys_sched_set_affinity(pid_t pid, unsigned int mask_len,
> unsigned long *new_mask_ptr);
>
> asmlinkage int sys_sched_get_affinity(pid_t pid, unsigned int
> *user_mask_len_ptr, unsigned long *user_mask_ptr);
I think that maybe it's better to have a new type :
typedef whatever-is-appropriate cpu_affinity_t;
with a set of macros :
CPU_AFFINITY_INIT(aptr)
CPU_AFFINITY_SET(aptr, n)
CPU_AFFINITY_ISSET(aprt, n)
so that we can simplify that interfaces :
asmlinkage int sys_sched_set_affinity(pid_t pid, cpu_affinity_t *aptr);
asmlinkage int sys_sched_get_affinity(pid_t pid, cpu_affinity_t *aptr);
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/