Barrelfish
|
Typedefs | |
typedef errval_t(* | coreset_iterator_fn) (void *st, coreid_t id) |
Function pointer used to call on every core in the coreset. More... | |
Functions | |
errval_t | coreset_new (struct coreset **set) |
Initialize a coreset. More... | |
void | coreset_destroy (struct coreset *set) |
Destroy a coreset. More... | |
errval_t | coreset_add (struct coreset *set, coreid_t id) |
Add a core to the coreset. More... | |
errval_t | coreset_remove (struct coreset *set, coreid_t id) |
Remove a core from the coreset. More... | |
bool | coreset_test (struct coreset *set, coreid_t id) |
Test if a core is specified in a coreset. More... | |
errval_t | coreset_get_next (struct coreset *set, coreset_token_t *token, coreid_t *id) |
Get the next item in the set. More... | |
errval_t | coreset_iterate (struct coreset *set, void *st, coreset_iterator_fn func) |
Iterate over all cores in the coreset. More... | |
errval_t | coreset_to_coremask (struct coreset *set, coremask_t *mask) |
Covert a coreset to coremask. More... | |
errval_t | coreset_from_coremask (coremask_t mask, struct coreset **set) |
Covert a coremask to coreset. More... | |
coreid_t | coreset_count (struct coreset *set) |
Count the number of cores in the coreset. More... | |
typedef errval_t(* coreset_iterator_fn) (void *st, coreid_t id) |
Function pointer used to call on every core in the coreset.
st | User supplied state |
id | The core id this is called for |
Refer to coreset_iterate.
errval_t coreset_add | ( | struct coreset * | set, |
coreid_t | id | ||
) |
Add a core to the coreset.
set | The coreset in which to add |
id | The core to add |
coreid_t coreset_count | ( | struct coreset * | set | ) |
Count the number of cores in the coreset.
set | The coreset to count |
count | Return the count of cores |
void coreset_destroy | ( | struct coreset * | set | ) |
Destroy a coreset.
set | The coreset to destroy. It cannot be used anymore |
errval_t coreset_from_coremask | ( | coremask_t | mask, |
struct coreset ** | set | ||
) |
Covert a coremask to coreset.
mask | The mask to covert |
set | The returned set |
The returned set is allocated using coreset_new and should be destroyed
errval_t coreset_get_next | ( | struct coreset * | set, |
coreset_token_t * | token, | ||
coreid_t * | id | ||
) |
Get the next item in the set.
set | The coreset |
token | Token to maintain internal state |
id | Pointer to return the coreid_t |
Iterates over all elements in #set. #CORESET_INIT_TOKEN is used for the #token the first time the function is called. The function updates the token for subsequent calls.
Use this as an alternative to coreset_iterate if you want control over exactly when the next element in the set is retrived.
errval_t coreset_iterate | ( | struct coreset * | set, |
void * | st, | ||
coreset_iterator_fn | func | ||
) |
Iterate over all cores in the coreset.
set | The coreset to iterate over |
st | Some user supplied state |
func | The function pointer to use |
This will call #func on every core that exists in the coreset in ascending order. If #func ever returns a non-success errval_t, then this will terminate early and return that errval_t to user.
errval_t coreset_new | ( | struct coreset ** | retset | ) |
Initialize a coreset.
set | Used to return the allocated coreset |
errval_t coreset_remove | ( | struct coreset * | set, |
coreid_t | id | ||
) |
Remove a core from the coreset.
set | The coreset in which to remove |
id | The core to remove |
bool coreset_test | ( | struct coreset * | set, |
coreid_t | id | ||
) |
Test if a core is specified in a coreset.
set | The coreset in which to test |
id | The core to test for |
errval_t coreset_to_coremask | ( | struct coreset * | set, |
coremask_t * | mask | ||
) |
Covert a coreset to coremask.
set | The coreset to convert |
mask | Use to return the mask |