VLC  4.0.0-dev
Data Structures | Typedefs | Functions
mta_holder.h File Reference
Include dependency graph for mta_holder.h:

Go to the source code of this file.

Data Structures

struct  vlc_mta_holder
 

Typedefs

typedef struct vlc_mta_holder vlc_mta_holder
 

Functions

static void * MtaMainLoop (void *opaque)
 
static bool vlc_mta_acquire (vlc_object_t *p_parent)
 Ensure an MTA context will be available until vlc_mta_release gets called. More...
 
static void vlc_mta_release (vlc_object_t *p_parent)
 Releases a reference to the MTA holder. More...
 

Typedef Documentation

◆ vlc_mta_holder

Function Documentation

◆ MtaMainLoop()

static void* MtaMainLoop ( void *  opaque)
inlinestatic

◆ vlc_mta_acquire()

static bool vlc_mta_acquire ( vlc_object_t p_parent)
inlinestatic

Ensure an MTA context will be available until vlc_mta_release gets called.

In the background, this will create a thread that does nothing but to keep the MTA refcount greater than 0.

This is useful in order not to commit a thread to a specific concurrency model. This function is win32 specific.

References vlc_mta_holder::i_refcount, MtaMainLoop(), vlc_mta_holder::ready_sem, vlc_mta_holder::release_sem, vlc_mta_holder::thread, unlikely, var_CreateGetAddress(), var_SetAddress(), vlc_clone(), vlc_global_lock, vlc_global_unlock, VLC_OBJECT, vlc_object_instance, vlc_sem_init(), vlc_sem_wait(), and VLC_THREAD_PRIORITY_LOW.

◆ vlc_mta_release()

static void vlc_mta_release ( vlc_object_t p_parent)
inlinestatic