diff options
Diffstat (limited to 'common/bo-cache.h')
-rw-r--r-- | common/bo-cache.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/bo-cache.h b/common/bo-cache.h index b397827..7d72e6c 100644 --- a/common/bo-cache.h +++ b/common/bo-cache.h @@ -12,6 +12,8 @@ struct bo_cache; struct bo_entry; +typedef void bo_free_fn_t(struct bo_entry *); + struct bo_bucket { struct xorg_list head; size_t size; @@ -21,7 +23,7 @@ struct bo_cache { struct bo_bucket buckets[NUM_BUCKETS]; struct xorg_list head; time_t last_cleaned; - void (*free)(struct bo_entry *); + bo_free_fn_t *free; }; struct bo_entry { @@ -31,7 +33,7 @@ struct bo_entry { time_t free_time; }; -void bo_cache_init(struct bo_cache *cache, void (*free)(struct bo_entry *)); +void bo_cache_init(struct bo_cache *cache, bo_free_fn_t *free); void bo_cache_fini(struct bo_cache *cache); struct bo_bucket *bo_cache_bucket_find(struct bo_cache *cache, size_t size); struct bo_entry *bo_cache_bucket_get(struct bo_bucket *bucket); |