Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cpu_rmap.h File Reference
#include <linux/cpumask.h>
#include <linux/gfp.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  cpu_rmap
 

Macros

#define CPU_RMAP_DIST_INF   0xffff
 

Functions

struct cpu_rmapalloc_cpu_rmap (unsigned int size, gfp_t flags)
 
int cpu_rmap_add (struct cpu_rmap *rmap, void *obj)
 
int cpu_rmap_update (struct cpu_rmap *rmap, u16 index, const struct cpumask *affinity)
 

Macro Definition Documentation

#define CPU_RMAP_DIST_INF   0xffff

Definition at line 33 of file cpu_rmap.h.

Function Documentation

struct cpu_rmap* alloc_cpu_rmap ( unsigned int  size,
gfp_t  flags 
)
read

alloc_cpu_rmap - allocate CPU affinity reverse-map : Number of objects to be mapped : Allocation flags e.g. GFP_KERNEL

Definition at line 30 of file cpu_rmap.c.

int cpu_rmap_add ( struct cpu_rmap rmap,
void obj 
)

cpu_rmap_add - add object to a rmap : CPU rmap allocated with alloc_cpu_rmap() : Object to add to rmap

Return index of object.

Definition at line 113 of file cpu_rmap.c.

int cpu_rmap_update ( struct cpu_rmap rmap,
u16  index,
const struct cpumask affinity 
)

cpu_rmap_update - update CPU rmap following a change of object affinity : CPU rmap to update : Index of object whose affinity changed : New CPU affinity of object

Definition at line 130 of file cpu_rmap.c.