numa.h   numa.h 
skipping to change at line 64 skipping to change at line 64
struct bitmask *numa_bitmask_clearbit(struct bitmask *, unsigned int); struct bitmask *numa_bitmask_clearbit(struct bitmask *, unsigned int);
unsigned int numa_bitmask_nbytes(struct bitmask *); unsigned int numa_bitmask_nbytes(struct bitmask *);
struct bitmask *numa_bitmask_alloc(unsigned int); struct bitmask *numa_bitmask_alloc(unsigned int);
void numa_bitmask_free(struct bitmask *); void numa_bitmask_free(struct bitmask *);
int numa_bitmask_equal(const struct bitmask *, const struct bitmask *); int numa_bitmask_equal(const struct bitmask *, const struct bitmask *);
void copy_nodemask_to_bitmask(nodemask_t *, struct bitmask *); void copy_nodemask_to_bitmask(nodemask_t *, struct bitmask *);
void copy_bitmask_to_nodemask(struct bitmask *, nodemask_t *); void copy_bitmask_to_nodemask(struct bitmask *, nodemask_t *);
void copy_bitmask_to_bitmask(struct bitmask *, struct bitmask *); void copy_bitmask_to_bitmask(struct bitmask *, struct bitmask *);
/* compatibility for codes that used them: */ /* compatibility for codes that used them: */
static inline void nodemask_zero(struct bitmask *mask)
static inline void nodemask_zero(nodemask_t *mask)
{ {
numa_bitmask_clearall(mask); struct bitmask tmp;
tmp.maskp = (unsigned long *)mask;
tmp.size = sizeof(nodemask_t) * 8;
numa_bitmask_clearall(&tmp);
} }
static inline int nodemask_equal(struct bitmask *a, struct bitmask *b) static inline void nodemask_zero_compat(nodemask_t *mask)
{ {
return numa_bitmask_equal(a, b); struct bitmask tmp;
tmp.maskp = (unsigned long *)mask;
tmp.size = sizeof(nodemask_t) * 8;
numa_bitmask_clearall(&tmp);
}
static inline void nodemask_set_compat(nodemask_t *mask, int node)
{
mask->n[node / (8*sizeof(unsigned long))] |=
(1UL<<(node%(8*sizeof(unsigned long))));
}
static inline void nodemask_clr_compat(nodemask_t *mask, int node)
{
mask->n[node / (8*sizeof(unsigned long))] &=
~(1UL<<(node%(8*sizeof(unsigned long))));
}
static inline int nodemask_isset_compat(const nodemask_t *mask, int node)
{
if ((unsigned)node >= NUMA_NUM_NODES)
return 0;
if (mask->n[node / (8*sizeof(unsigned long))] &
(1UL<<(node%(8*sizeof(unsigned long)))))
return 1;
return 0;
}
static inline int nodemask_equal(const nodemask_t *a, const nodemask_t *b)
{
struct bitmask tmp_a, tmp_b;
tmp_a.maskp = (unsigned long *)a;
tmp_a.size = sizeof(nodemask_t) * 8;
tmp_b.maskp = (unsigned long *)b;
tmp_b.size = sizeof(nodemask_t) * 8;
return numa_bitmask_equal(&tmp_a, &tmp_b);
}
static inline int nodemask_equal_compat(const nodemask_t *a, const nodemask
_t *b)
{
struct bitmask tmp_a, tmp_b;
tmp_a.maskp = (unsigned long *)a;
tmp_a.size = sizeof(nodemask_t) * 8;
tmp_b.maskp = (unsigned long *)b;
tmp_b.size = sizeof(nodemask_t) * 8;
return numa_bitmask_equal(&tmp_a, &tmp_b);
} }
/* NUMA support available. If this returns a negative value all other funct ion /* NUMA support available. If this returns a negative value all other funct ion
in this library are undefined. */ in this library are undefined. */
int numa_available(void); int numa_available(void);
/* Basic NUMA state */ /* Basic NUMA state */
/* Get max available node */ /* Get max available node */
int numa_max_node(void); int numa_max_node(void);
skipping to change at line 107 skipping to change at line 164
/* Set with all cpus. */ /* Set with all cpus. */
extern struct bitmask *numa_all_cpus_ptr; extern struct bitmask *numa_all_cpus_ptr;
/* Set with no nodes */ /* Set with no nodes */
extern struct bitmask *numa_no_nodes_ptr; extern struct bitmask *numa_no_nodes_ptr;
/* Source compatibility */ /* Source compatibility */
extern nodemask_t numa_no_nodes; extern nodemask_t numa_no_nodes;
extern char *nodes_allowed_list;
/* Only run and allocate memory from a specific set of nodes. */ /* Only run and allocate memory from a specific set of nodes. */
void numa_bind(struct bitmask *nodes); void numa_bind(struct bitmask *nodes);
/* Set the NUMA node interleaving mask. 0 to turn off interleaving */ /* Set the NUMA node interleaving mask. 0 to turn off interleaving */
void numa_set_interleave_mask(struct bitmask *nodemask); void numa_set_interleave_mask(struct bitmask *nodemask);
/* Return the current interleaving mask */ /* Return the current interleaving mask */
struct bitmask *numa_get_interleave_mask(void); struct bitmask *numa_get_interleave_mask(void);
/* allocate a bitmask big enough for all nodes */ /* allocate a bitmask big enough for all nodes */
skipping to change at line 217 skipping to change at line 276
struct bitmask *numa_allocate_cpumask(); struct bitmask *numa_allocate_cpumask();
static inline void numa_free_cpumask(struct bitmask *b) static inline void numa_free_cpumask(struct bitmask *b)
{ {
numa_bitmask_free(b); numa_bitmask_free(b);
} }
/* Convert node to CPU mask. -1/errno on failure, otherwise 0. */ /* Convert node to CPU mask. -1/errno on failure, otherwise 0. */
int numa_node_to_cpus(int, struct bitmask *); int numa_node_to_cpus(int, struct bitmask *);
/* report the node of the specified cpu. -1/errno on invalid cpu. */
int numa_node_of_cpu(int cpu);
/* Report distance of node1 from node2. 0 on error.*/ /* Report distance of node1 from node2. 0 on error.*/
int numa_distance(int node1, int node2); int numa_distance(int node1, int node2);
/* Error handling. */ /* Error handling. */
/* This is an internal function in libnuma that can be overwritten by an us er /* This is an internal function in libnuma that can be overwritten by an us er
program. Default is to print an error to stderr and exit if numa_exit_on _error program. Default is to print an error to stderr and exit if numa_exit_on _error
is true. */ is true. */
void numa_error(char *where); void numa_error(char *where);
/* When true exit the program when a NUMA system call (except numa_availabl e) /* When true exit the program when a NUMA system call (except numa_availabl e)
 End of changes. 6 change blocks. 
4 lines changed or deleted 67 lines changed or added


 numacompat1.h   numacompat1.h 
skipping to change at line 14 skipping to change at line 14
#define numa_get_membind(m) numa_get_membind_compat(m) #define numa_get_membind(m) numa_get_membind_compat(m)
#define numa_set_membind(m) numa_set_membind_compat(m) #define numa_set_membind(m) numa_set_membind_compat(m)
#define numa_alloc_interleaved_subset(s,m) numa_alloc_interleaved_subset_co mpat(s,m) #define numa_alloc_interleaved_subset(s,m) numa_alloc_interleaved_subset_co mpat(s,m)
#define numa_run_on_node_mask(m) numa_run_on_node_mask_compat(m) #define numa_run_on_node_mask(m) numa_run_on_node_mask_compat(m)
#define numa_get_run_node_mask() numa_get_run_node_mask_compat() #define numa_get_run_node_mask() numa_get_run_node_mask_compat()
#define numa_interleave_memory(st,si,m) numa_interleave_memory_compat(st,si ,m) #define numa_interleave_memory(st,si,m) numa_interleave_memory_compat(st,si ,m)
#define numa_tonodemask_memory(st,si,m) numa_tonodemask_memory_compat(st,si ,m) #define numa_tonodemask_memory(st,si,m) numa_tonodemask_memory_compat(st,si ,m)
#define numa_sched_getaffinity(p,l,m) numa_sched_getaffinity_compat(p,l,m ) #define numa_sched_getaffinity(p,l,m) numa_sched_getaffinity_compat(p,l,m )
#define numa_sched_setaffinity(p,l,m) numa_sched_setaffinity_compat(p,l,m ) #define numa_sched_setaffinity(p,l,m) numa_sched_setaffinity_compat(p,l,m )
#define numa_node_to_cpus(n,b,bl) numa_node_to_cpus_compat(n,b,bl) #define numa_node_to_cpus(n,b,bl) numa_node_to_cpus_compat(n,b,bl)
#define nodemask_zero(m) nodemask_zero_compat(m)
#define nodemask_set(m, n) nodemask_set_compat(m, n)
#define nodemask_clr(m, n) nodemask_clr_compat(m, n)
#define nodemask_isset(m, n) nodemask_isset_compat(m, n)
#define nodemask_equal(a, b) nodemask_equal_compat(a, b)
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/