39struct vlc_queue_entry;
46 struct vlc_queue_entry *
first;
179 return q->
first == NULL;
229 bool *restrict tombstone)
243 const bool *tombstone)
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
void vlc_cond_signal(vlc_cond_t *cond)
Wakes up one thread waiting on a condition variable.
Definition: threads.c:204
void vlc_cond_wait(vlc_cond_t *cond, vlc_mutex_t *mutex)
Waits on a condition variable.
Definition: threads.c:291
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:160
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:106
static void * vlc_queue_DequeueKillable(vlc_queue_t *q, const bool *tombstone)
Dequeues one entry from a killable queue.
Definition: vlc_queue.h:243
static void vlc_queue_Kill(vlc_queue_t *q, bool *restrict tombstone)
Marks a queue ended.
Definition: vlc_queue.h:229
static void vlc_queue_Lock(vlc_queue_t *q)
Locks a queue.
Definition: vlc_queue.h:88
static void vlc_queue_Wait(vlc_queue_t *q)
Waits for a queue entry.
Definition: vlc_queue.h:122
void vlc_queue_EnqueueUnlocked(vlc_queue_t *, void *entry)
Queues an entry (without locking).
Definition: queue.c:80
void * vlc_queue_DequeueAllUnlocked(vlc_queue_t *)
Dequeues all entries (without locking).
Definition: queue.c:116
static void vlc_queue_Signal(vlc_queue_t *q)
Wakes one thread waiting for a queue entry up.
Definition: vlc_queue.h:108
void * vlc_queue_DequeueUnlocked(vlc_queue_t *)
Dequeues the oldest entry (without locking).
Definition: queue.c:96
static void vlc_queue_Unlock(vlc_queue_t *q)
Unlocks a queue.
Definition: vlc_queue.h:100
static bool vlc_queue_IsEmpty(const vlc_queue_t *q)
Checks if a queue is empty (without locking).
Definition: vlc_queue.h:178
void * vlc_queue_Dequeue(vlc_queue_t *queue)
Dequeues the oldest entry.
Definition: queue.c:135
void * vlc_queue_DequeueAll(vlc_queue_t *)
Dequeues all entries.
Definition: queue.c:151
void vlc_queue_Enqueue(vlc_queue_t *, void *entry)
Queues an entry.
Definition: queue.c:128
struct vlc_queue vlc_queue_t
Thread-safe queue (a.k.a.
void vlc_queue_Init(vlc_queue_t *queue, ptrdiff_t next_offset)
Initializes a queue.
Definition: queue.c:71
Definition: fourcc_gen.c:52
Condition variable.
Definition: vlc_threads.h:322
Mutex.
Definition: vlc_threads.h:195
Thread-safe queue (a.k.a.
Definition: vlc_queue.h:46
struct vlc_queue_entry * first
Definition: vlc_queue.h:47
struct vlc_queue_entry ** lastp
Definition: vlc_queue.h:48
vlc_cond_t wait
Definition: vlc_queue.h:51
vlc_mutex_t lock
Definition: vlc_queue.h:50
ptrdiff_t next_offset
Definition: vlc_queue.h:49
This file is a collection of common definitions and types.
Thread primitive declarations.