42#ifndef DT_CACHES_PIXELPIPE_CACHE_WAIT_H
43#define DT_CACHES_PIXELPIPE_CACHE_WAIT_H
137 int64_t
age_us, gpointer user_data);
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void(* dt_pixelpipe_cache_wait_visitor_t)(const dt_pixelpipe_cache_wait_t *wait, int64_t age_us, gpointer user_data)
Walk the outstanding requests. callback is invoked under the queue lock, so it must not re-enter this...
guint dt_pixelpipe_cache_wait_pending_count(void)
How many requests are outstanding. Diagnostics only.
void dt_pixelpipe_cache_wait_foreach_pending(dt_pixelpipe_cache_wait_visitor_t callback, gpointer user_data)
gboolean dt_pixelpipe_cache_wait_cancel(dt_pixelpipe_cache_wait_t *wait, gboolean *drained)
Remove wait from the queue if it is there, and reset it to an inert state.
void(* dt_pixelpipe_cache_ready_callback_t)(gpointer user_data)
Called when the awaited cacheline finally exists. Runs on the caller's thread.
GList * dt_pixelpipe_cache_wait_take_matching(uint64_t hash, uint64_t producer_node_key, gboolean *drained)
Take every waiter satisfied by a publication of hash from node producer_node_key.
gboolean dt_pixelpipe_cache_wait_enqueue(dt_pixelpipe_cache_wait_t *wait)
Queue wait, or refresh it in place if it is already queued for the same target.
void dt_pixelpipe_cache_wait_count_immediate_hit(void)
Count one cache hit that never needed to queue.
void dt_pixelpipe_cache_wait_get_stats(uint64_t *queued, uint64_t *served, uint64_t *cancelled, uint64_t *immediate_hits, uint64_t *misses)
Snapshot of the lifetime counters, for the dump. Any pointer may be NULL.
void dt_pixelpipe_cache_wait_count_miss(void)
Count one miss that is about to queue.
unsigned __int64 uint64_t
One consumer's outstanding request, owned by that consumer, not by the queue.
dt_pixelpipe_cache_ready_callback_t restart
int module_multi_priority
const void *char module_op[20]