lkml.org 
[lkml]   [2001]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] sched_[set|get]_affinity() syscall, 2.4.15-pre9
On Thu, 22 Nov 2001, Ingo Molnar wrote:

>
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.127 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site