• Mike Travis's avatar
    sched: add new set_cpus_allowed_ptr function · cd8ba7cd
    Mike Travis authored
    Add a new function that accepts a pointer to the "newly allowed cpus"
    cpumask argument.
    
    int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)
    
    The current set_cpus_allowed() function is modified to use the above
    but this does not result in an ABI change.  And with some compiler
    optimization help, it may not introduce any additional overhead.
    
    Additionally, to enforce the read only nature of the new_mask arg, the
    "const" property is migrated to sub-functions called by set_cpus_allowed.
    This silences compiler warnings.
    Signed-off-by: default avatarMike Travis <travis@sgi.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    cd8ba7cd
sched_rt.c 30.6 KB