myMPD
Internal API documentation
Loading...
Searching...
No Matches
cache_rax.h File Reference

General rax cache handling. More...

#include "dist/rax/rax.h"
#include <pthread.h>
#include <stdbool.h>
Include dependency graph for cache_rax.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_cache
 

Functions

bool cache_init (struct t_cache *cache)
 
bool cache_free (struct t_cache *cache)
 
bool cache_get_read_lock (struct t_cache *cache)
 
bool cache_get_write_lock (struct t_cache *cache)
 
bool cache_release_lock (struct t_cache *cache)
 

Detailed Description

General rax cache handling.

Function Documentation

◆ cache_free()

bool cache_free ( struct t_cache cache)

Frees a cache struct

Parameters
cachePointer to cache struct to free
Returns
true on success, else false

◆ cache_get_read_lock()

bool cache_get_read_lock ( struct t_cache cache)

Acquires a read lock

Parameters
cachepointer to cache struct
Returns
true on success, else false

◆ cache_get_write_lock()

bool cache_get_write_lock ( struct t_cache cache)

Acquires a write lock

Parameters
cachepointer to cache struct
Returns
true on success, else false

◆ cache_init()

bool cache_init ( struct t_cache cache)

Initializes a cache struct

Parameters
cachePointer to cache struct to free
Returns
true on success, else false

◆ cache_release_lock()

bool cache_release_lock ( struct t_cache cache)

Frees the lock

Parameters
cachepointer to cache struct
Returns
true on success, else false