src/libruntime/rmem/cache.c
/**
 * @brief Selects the replacement policy function based on the
 * replacement policy number.
 *
 * @returns Upon successful completion, the free index of a page is
 * returned. Upon failure a negative error code is returned instead.
 */
@brief Selects the replacement policy function based on the
replacement policy number.

@returns Upon successful completion, the free index of a page is
returned. Upon failure a negative error code is returned instead.
@brief Selects the replacement policy function based on the replacement policy number . @returns Upon successful completion the free index of a page is returned . Upon failure a negative error code is returned instead .
static int nanvix_rcache_replacement_policies(void)
{
	if (cache_policy == RMEM_CACHE_FIFO)
		return (nanvix_rcache_fifo());
	if (cache_policy == RMEM_CACHE_LIFO)
		return (nanvix_rcache_lifo());
	return (nanvix_rcache_lru());
}
static int nanvix_rcache_replacement_policies ( void ) { if ( cache_policy == RMEM_CACHE_FIFO ) return ( nanvix_rcache_fifo ( ) ) ; if ( cache_policy == RMEM_CACHE_LIFO ) return ( nanvix_rcache_lifo ( ) ) ; return ( nanvix_rcache_lru ( ) ) ; }
@brief Selects the replacement policy function based on the
 replacement policy number.
@brief Selects the replacement policy function based on the replacement policy number .