/* Takes an already created cell and links it into hash table on the * appropiate entry. */ void insert_into_hash_table_unsafe( struct cell * p_cell ) { struct entry* p_entry; /* locates the apropiate entry */ p_entry = &tm_table->entrys[ p_cell->hash_index ]; p_cell->label = p_entry->next_label++; if ( p_entry->last_cell ) { p_entry->last_cell->next_cell = p_cell; p_cell->prev_cell = p_entry->last_cell; } else p_entry->first_cell = p_cell; p_entry->last_cell = p_cell; /* update stats */ p_entry->cur_entries++; p_entry->acc_entries++; t_stats_new(p_cell->local); }
/* Takes an already created cell and links it into hash table on the * appropriate entry. */ void insert_into_hash_table_unsafe( struct cell * p_cell, unsigned int _hash ) { struct entry* p_entry; p_cell->hash_index=_hash; /* locates the appropriate entry */ p_entry = &tm_table->entrys[ _hash ]; p_cell->label = p_entry->next_label++; if ( p_entry->last_cell ) { p_entry->last_cell->next_cell = p_cell; p_cell->prev_cell = p_entry->last_cell; } else p_entry->first_cell = p_cell; p_entry->last_cell = p_cell; /* update stats */ p_entry->cur_entries++; p_entry->acc_entries++; t_stats_new( is_local(p_cell) ); }