Lines Matching refs:hash_obj

71 add_hashobject_to_hashtable(hash_obj_t *hash_obj)  in add_hashobject_to_hashtable()  argument
76 hash_obj->obj_hdl = ++handle_count; /* store the handle */ in add_hashobject_to_hashtable()
79 index_to_hash = ((hash_obj->obj_hdl) % TABLE_SIZE); in add_hashobject_to_hashtable()
81 hash_obj->next = hash_table[index_to_hash]; in add_hashobject_to_hashtable()
82 hash_table[index_to_hash] = hash_obj; /* hash obj. added */ in add_hashobject_to_hashtable()
84 if (hash_obj->next != NULL) { in add_hashobject_to_hashtable()
85 hash_obj->next->prev = hash_obj; in add_hashobject_to_hashtable()
93 hash_obj_t *hash_obj; in create_container_hash_object() local
101 hash_obj = malloc(sizeof (hash_obj_t)); in create_container_hash_object()
102 if (hash_obj == NULL) { in create_container_hash_object()
109 hash_obj->object_type = CONTAINER_TYPE; in create_container_hash_object()
110 hash_obj->u.cont_obj = cont_obj; in create_container_hash_object()
111 hash_obj->next = NULL; in create_container_hash_object()
112 hash_obj->prev = NULL; in create_container_hash_object()
114 return (hash_obj); in create_container_hash_object()
121 hash_obj_t *hash_obj; in create_section_hash_object() local
129 hash_obj = malloc(sizeof (hash_obj_t)); in create_section_hash_object()
130 if (hash_obj == NULL) { in create_section_hash_object()
138 hash_obj->u.sec_obj = sec_obj; in create_section_hash_object()
139 hash_obj->object_type = SECTION_TYPE; in create_section_hash_object()
140 hash_obj->next = NULL; in create_section_hash_object()
141 hash_obj->prev = NULL; in create_section_hash_object()
143 return (hash_obj); in create_section_hash_object()
150 hash_obj_t *hash_obj; in create_segment_hash_object() local
158 hash_obj = malloc(sizeof (hash_obj_t)); in create_segment_hash_object()
159 if (hash_obj == NULL) { in create_segment_hash_object()
167 hash_obj->object_type = SEGMENT_TYPE; in create_segment_hash_object()
168 hash_obj->u.seg_obj = seg_obj; in create_segment_hash_object()
169 hash_obj->next = NULL; in create_segment_hash_object()
170 hash_obj->prev = NULL; in create_segment_hash_object()
172 return (hash_obj); in create_segment_hash_object()
179 hash_obj_t *hash_obj; in create_packet_hash_object() local
187 hash_obj = malloc(sizeof (hash_obj_t)); in create_packet_hash_object()
188 if (hash_obj == NULL) { in create_packet_hash_object()
195 hash_obj->object_type = PACKET_TYPE; in create_packet_hash_object()
196 hash_obj->u.pkt_obj = pkt_obj; in create_packet_hash_object()
197 hash_obj->next = NULL; in create_packet_hash_object()
198 hash_obj->prev = NULL; in create_packet_hash_object()
200 return (hash_obj); in create_packet_hash_object()
208 hash_obj_t *hash_obj = NULL; in get_container_hash_object() local
214 hash_obj = lookup_handle_object(handle, CONTAINER_TYPE); in get_container_hash_object()
215 if (hash_obj == NULL) { in get_container_hash_object()
220 hash_obj = lookup_handle_object(handle, SECTION_TYPE); in get_container_hash_object()
221 if (hash_obj == NULL) { in get_container_hash_object()
224 hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl, in get_container_hash_object()
233 return (hash_obj); in get_container_hash_object()
261 free_pkt_object_list(hash_obj_t *hash_obj) in free_pkt_object_list() argument
266 next_obj = hash_obj->u.seg_obj->pkt_obj_list; in free_pkt_object_list()
289 hash_obj->u.seg_obj->pkt_obj_list = NULL; in free_pkt_object_list()
1160 hash_obj_t *hash_obj; in fru_close_container() local
1166 hash_obj = lookup_handle_object(container, CONTAINER_TYPE); in fru_close_container()
1167 if (hash_obj == NULL) { in fru_close_container()
1172 sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list; in fru_close_container()
1207 if (hash_obj->prev == NULL) { in fru_close_container()
1208 hash_table[(hash_obj->obj_hdl % TABLE_SIZE)] = in fru_close_container()
1209 hash_obj->next; in fru_close_container()
1210 if (hash_obj->next != NULL) { in fru_close_container()
1211 hash_obj->next->prev = NULL; in fru_close_container()
1214 hash_obj->prev->next = hash_obj->next; in fru_close_container()
1215 if (hash_obj->next != NULL) { in fru_close_container()
1216 hash_obj->next->prev = hash_obj->prev; in fru_close_container()
1220 free(hash_obj->u.cont_obj); in fru_close_container()
1221 free(hash_obj); in fru_close_container()