|
Barrelfish
|
Bitmap manipulation. More...
Functions | |
| struct bitmap * | numa_parse_nodestring (char *string) |
| parses a character string list of nodes into a bit mask. More... | |
| struct bitmap * | numa_parse_cpustring (char *string) |
| parses a character string list of cpus into a bit mask. More... | |
| struct bitmap * | numa_allocate_cpumask (void) |
| allocating a bitmap to hold all the configured CPUs More... | |
| void | numa_free_cpumask (struct bitmap *cpumask) |
| frees a previously allocated CPU bitmask More... | |
| struct bitmap * | numa_allocate_nodemask (void) |
| allocates a bit mask to represent the nodes in the system More... | |
| void | numa_free_nodemask (struct bitmap *nodemask) |
| frees a previously allocated node bitmask More... | |
| struct bitmap * | numa_bitmask_alloc (unsigned int n) |
| allocates a bitmask structure and its associated bit mask More... | |
| struct bitmap * | numa_bitmask_clearall (struct bitmap *bmp) |
| sets all bits in the bit mask to 0. More... | |
| struct bitmap * | numa_bitmask_clearbit (struct bitmap *bmp, unsigned int n) |
| clears the n-th bit of a bitmask More... | |
| bool | numa_bitmask_equal (const struct bitmap *bmp1, const struct bitmap *bmp2) |
| checks if two bitmasks are equal More... | |
| void | numa_bitmask_free (struct bitmap *bmp) |
| frees the memory of a bitmask More... | |
| bool | numa_bitmask_isbitset (const struct bitmap *bmp, unsigned int n) |
| checks if the n-th bit is set in the bitmask More... | |
| size_t | numa_bitmask_nbytes (struct bitmap *bmp) |
| returns the size (in bytes) of the bit mask More... | |
| struct bitmap * | numa_bitmask_setall (struct bitmap *bmp) |
| sets all bits of a bitmask to 1 More... | |
| struct bitmap * | numa_bitmask_setbit (struct bitmap *bmp, unsigned int n) |
| sets the n-th bit of a bitmask to 1 More... | |
| void | copy_bitmask_to_nodemask (struct bitmap *bmp, nodemask_t *nodemask) |
| copies the bitmask to a nodemask More... | |
| void | copy_nodemask_to_bitmask (nodemask_t *nodemask, struct bitmap *bmp) |
| copies the contents of a nodemask into the bitmask More... | |
| void | copy_bitmask_to_bitmask (struct bitmap *bmpfrom, struct bitmap *bmpto) |
| copies one bitmask into another More... | |
| uint32_t | numa_bitmask_weight (const struct bitmap *bmp) |
| returns a count of the bits that are set in the body of the bitmask More... | |
Bitmap manipulation.
| void copy_bitmask_to_bitmask | ( | struct bitmap * | bmpfrom, |
| struct bitmap * | bmpto | ||
| ) |
copies one bitmask into another
| bmpfrom | the source bitmask |
| bmpto | the destination bitmask |
If the two areas differ in size, the copy is truncated to the size of the receiving field or zero-filled.
| void copy_bitmask_to_nodemask | ( | struct bitmap * | bmp, |
| nodemask_t * | nodemask | ||
| ) |
copies the bitmask to a nodemask
| bmp | the bitmask to copy |
| nodemask | the destination nodemask |
If the two areas differ in size, the copy is truncated to the size of the receiving field or zero-filled.
| void copy_nodemask_to_bitmask | ( | nodemask_t * | nodemask, |
| struct bitmap * | bmp | ||
| ) |
copies the contents of a nodemask into the bitmask
| nodemask | node mask to copy from |
| bmp | bitmap to copy into |
If the two areas differ in size, the copy is truncated to the size of the receiving field or zero-filled.
| struct bitmap* numa_allocate_cpumask | ( | void | ) |
allocating a bitmap to hold all the configured CPUs
allocates a bit mask to represent the cores in the system
| struct bitmap* numa_allocate_nodemask | ( | void | ) |
allocates a bit mask to represent the nodes in the system
| struct bitmap* numa_bitmask_alloc | ( | unsigned int | n | ) |
allocates a bitmask structure and its associated bit mask
| n | the number of bits |
| struct bitmap* numa_bitmask_clearall | ( | struct bitmap * | bmp | ) |
sets all bits in the bit mask to 0.
| bmp | pointer to the bitmap |
| struct bitmap* numa_bitmask_clearbit | ( | struct bitmap * | bmp, |
| unsigned int | n | ||
| ) |
clears the n-th bit of a bitmask
| bmp | the bitmask |
| n | the bit to clear |
| bool numa_bitmask_equal | ( | const struct bitmap * | bmp1, |
| const struct bitmap * | bmp2 | ||
| ) |
checks if two bitmasks are equal
| bmp1 | bitmask 1 |
| bmp2 | bitmask 2 |
| void numa_bitmask_free | ( | struct bitmap * | bmp | ) |
frees the memory of a bitmask
| bmp | the bitmask to be freed |
| bool numa_bitmask_isbitset | ( | const struct bitmap * | bmp, |
| unsigned int | n | ||
| ) |
checks if the n-th bit is set in the bitmask
| bmp | the bitmap |
| n | which bit to check |
| size_t numa_bitmask_nbytes | ( | struct bitmap * | bmp | ) |
returns the size (in bytes) of the bit mask
| bmp | the bitmask |
| struct bitmap* numa_bitmask_setall | ( | struct bitmap * | bmp | ) |
sets all bits of a bitmask to 1
| bmp | the bitmask |
| struct bitmap* numa_bitmask_setbit | ( | struct bitmap * | bmp, |
| unsigned int | n | ||
| ) |
sets the n-th bit of a bitmask to 1
| bmp | the bitmask |
| n | which bit to activate |
| uint32_t numa_bitmask_weight | ( | const struct bitmap * | bmp | ) |
returns a count of the bits that are set in the body of the bitmask
| bmp | the bitmask to count the set bits |
| void numa_free_cpumask | ( | struct bitmap * | cpumask | ) |
frees a previously allocated CPU bitmask
| cpumask | pointer to a previously allocated CPU bitmask |
| void numa_free_nodemask | ( | struct bitmap * | nodemask | ) |
frees a previously allocated node bitmask
| nodemask | pointer to a previously allocated node bitmask |
| struct bitmap* numa_parse_cpustring | ( | char * | string | ) |
parses a character string list of cpus into a bit mask.
| string | character string to parse |
The string is a comma-separated list of cpu numbers or cpu ranges Examples: 1-5,7,10 !4-5 +0-3
| struct bitmap* numa_parse_nodestring | ( | char * | string | ) |
parses a character string list of nodes into a bit mask.
| string | character string to parse |
The string is a comma-separated list of node numbers or node ranges Examples: 1-5,7,10 !4-5 +0-3
If the string length is zero, then the numa_no_nodes_ptr is returned
1.8.11