summaryrefslogtreecommitdiffstats
path: root/lib/affinitymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/affinitymap.c')
-rw-r--r--lib/affinitymap.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/lib/affinitymap.c b/lib/affinitymap.c
index 17e1b2c..e53d54a 100644
--- a/lib/affinitymap.c
+++ b/lib/affinitymap.c
@@ -47,7 +47,7 @@ DEFINE_MTYPE_STATIC(LIB, AFFINITY_MAP_INDEX, "Affinity map index");
DEFINE_QOBJ_TYPE(affinity_maps);
DEFINE_QOBJ_TYPE(affinity_map);
-struct affinity_maps affinity_map_master = {NULL, NULL, NULL, NULL};
+struct affinity_maps affinity_map_master = {NULL, NULL};
static void affinity_map_free(struct affinity_map *map)
{
@@ -106,36 +106,6 @@ struct affinity_map *affinity_map_get(const char *name)
return NULL;
}
-
-char *affinity_map_name_get(int pos)
-{
- struct listnode *node;
- struct affinity_map *map;
-
- if (!affinity_map_master.maps)
- return NULL;
-
- for (ALL_LIST_ELEMENTS_RO(affinity_map_master.maps, node, map))
- if (map->bit_position == pos)
- return map->name;
- return NULL;
-}
-
-bool affinity_map_check_use_hook(const char *affmap_name)
-{
- if (affinity_map_master.check_use_hook)
- return (*affinity_map_master.check_use_hook)(affmap_name);
- return false;
-}
-
-bool affinity_map_check_update_hook(const char *affmap_name, uint16_t new_pos)
-{
- if (affinity_map_master.check_update_hook)
- return (*affinity_map_master.check_update_hook)(affmap_name,
- new_pos);
- return true;
-}
-
void affinity_map_update_hook(const char *affmap_name, uint16_t new_pos)
{
struct affinity_map *map;
@@ -153,18 +123,6 @@ void affinity_map_update_hook(const char *affmap_name, uint16_t new_pos)
new_pos);
}
-
-void affinity_map_set_check_use_hook(bool (*func)(const char *affmap_name))
-{
- affinity_map_master.check_use_hook = func;
-}
-
-void affinity_map_set_check_update_hook(bool (*func)(const char *affmap_name,
- uint16_t new_pos))
-{
- affinity_map_master.check_update_hook = func;
-}
-
void affinity_map_set_update_hook(void (*func)(const char *affmap_name,
uint16_t old_pos,
uint16_t new_pos))