-static INLINE void *_arch_data_insert(arch_kind_t kind, arch_isa_t *isa,
- const char *name, size_t size, int *was_new)
-{
- const obj_info_t *info = &obj_info[kind];
- arch_header_t *data = alloca(size);
- arch_header_t *res = NULL;
-
- memset(data, 0, size);
- data->kind = kind;
- data->isa = isa;
- data->name = get_id_str(new_id_from_str(name));
- data->is_new = 1;
-
- res = set_insert(get_arch_data(), data, size, hash_header(data));
-
- /* If the object is newly created and thus not yet present
- * in the set, add it to the isa */
- if(res->is_new) {
-
- /*
- * The inserted object was no isa, list it in the isa if this is
- * desired.
- */
- if(isa && info->listed_in_isa)
- list_add(&res->list, &isa->heads[kind]);
-
- /* The inserted object is an isa, so initialize all its list heads. */
- else {
- int i;
- arch_isa_t *isa = (arch_isa_t *) res;
-
- for(i = 0; i < arch_kind_last; ++i)
- INIT_LIST_HEAD(&isa->heads[i]);
- }
- }
-
- /*
- * If the caller wants to know, of the object was newly created,
- * give it to him.
- */
- if(was_new)
- *was_new = res->is_new;
-
- /* Mark the object as NOT new. */
- res->is_new = 0;
-
- return res;
-}
-
-#define arch_data_insert(type_suffix, isa, name, was_new) \
- _arch_data_insert(arch_kind_ ## type_suffix, isa, name, sizeof(arch_ ## type_suffix ## _t), was_new)
-
-static INLINE void *_arch_data_find(arch_kind_t kind, const arch_isa_t *isa, const char *name)