VLC 4.0.0-dev
|
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. | |
static void | vlc_mta_release (vlc_object_t *p_parent) |
Releases a reference to the MTA holder. | |
typedef struct vlc_mta_holder vlc_mta_holder |
|
inlinestatic |
References vlc_mta_holder::ready_sem, vlc_mta_holder::release_sem, vlc_sem_post(), vlc_sem_wait(), and vlc_thread_set_name().
Referenced by vlc_mta_acquire().
|
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(), and vlc_sem_wait().
|
inlinestatic |
Releases a reference to the MTA holder.
When its refcount reaches 0, the thread created by
References vlc_mta_holder::i_refcount, vlc_mta_holder::release_sem, vlc_mta_holder::thread, var_InheritAddress(), var_SetAddress(), vlc_global_lock, vlc_global_unlock, vlc_join(), VLC_OBJECT, vlc_object_instance, and vlc_sem_post().