zabbix-agent2/src/libs/zbxtrends/cache.c
/******************************************************************************
 *                                                                            *
 * Function: tfc_lru_append                                                   *
 *                                                                            *
 * Purpose: append data to the tail of least recently used slot list          *
 *                                                                            *
 ******************************************************************************/
tfc_lru_append

Purpose: append data to the tail of least recently used slot list
tfc_lru_append Purpose : append data to the tail of least recently used slot list
static void	tfc_lru_append(zbx_tfc_data_t *data)
{
	zbx_uint32_t	index;
	index = tfc_data_slot_index(data);
	data->prev = cache->lru_tail;
	data->next = UINT32_MAX;
	if (UINT32_MAX != data->prev)
		cache->slots[data->prev].data.next = index;
	else
		cache->lru_head = index;
	cache->lru_tail = index;
}
static void tfc_lru_append ( zbx_tfc_data_t * data ) { zbx_uint32_t index ; index = tfc_data_slot_index ( data ) ; data -> prev = cache -> lru_tail ; data -> next = UINT32_MAX ; if ( UINT32_MAX != data -> prev ) cache -> slots [ data -> prev ] . data . next = index ; else cache -> lru_head = index ; cache -> lru_tail = index ; }
Function: tfc_lru_append                                                   
                                                                            
 Purpose: append data to the tail of least recently used slot list
Function : tfc_lru_append Purpose : append data to the tail of least recently used slot list