Back to index

numactl  2.0.8~rc4
numaint.h
Go to the documentation of this file.
00001 /* Internal interfaces of libnuma */
00002 #include "bitops.h"
00003 
00004 extern int numa_sched_setaffinity_v1(pid_t pid, unsigned len, const unsigned long *mask);
00005 extern int numa_sched_getaffinity_v1(pid_t pid, unsigned len, const unsigned long *mask);
00006 extern int numa_sched_setaffinity_v1_int(pid_t pid, unsigned len,const unsigned long *mask);
00007 extern int numa_sched_getaffinity_v1_int(pid_t pid, unsigned len,const unsigned long *mask);
00008 extern int numa_sched_setaffinity_v2(pid_t pid, struct bitmask *mask);
00009 extern int numa_sched_getaffinity_v2(pid_t pid, struct bitmask *mask);
00010 extern int numa_sched_setaffinity_v2_int(pid_t pid, struct bitmask *mask);
00011 extern int numa_sched_getaffinity_v2_int(pid_t pid, struct bitmask *mask);
00012 
00013 #define SHM_HUGETLB     04000   /* segment will use huge TLB pages */
00014 
00015 #define CPU_BYTES(x) (round_up(x, BITS_PER_LONG)/8)
00016 #define CPU_LONGS(x) (CPU_BYTES(x) / sizeof(long))
00017 
00018 #define make_internal_alias(x) extern __typeof (x) x##_int __attribute((alias(#x), visibility("hidden")))
00019 #define hidden __attribute__((visibility("hidden")))
00020 
00021 enum numa_warn {
00022        W_nosysfs,
00023        W_noproc,
00024        W_badmeminfo,
00025        W_nosysfs2,
00026        W_cpumap,
00027        W_numcpus,
00028        W_noderunmask,
00029        W_distance,
00030        W_memory,
00031        W_cpuparse,
00032        W_nodeparse,
00033        W_blockdev1,
00034        W_blockdev2,
00035        W_blockdev3,
00036        W_blockdev4,
00037        W_blockdev5,
00038        W_netlink1,
00039        W_netlink2,
00040        W_netlink3,
00041        W_net1,
00042        W_net2,
00043        W_class1,
00044        W_class2,
00045        W_pci1,
00046        W_pci2,
00047        W_node_parse1,
00048        W_node_parse2,
00049        W_nonode,
00050        W_badchar,
00051 };
00052 
00053 #define howmany(x,y) (((x)+((y)-1))/(y))
00054 #define bitsperlong (8 * sizeof(unsigned long))
00055 #define bitsperint (8 * sizeof(unsigned int))
00056 #define longsperbits(n) howmany(n, bitsperlong)
00057 #define bytesperbits(x) ((x+7)/8)