VLC
4.0.0-dev
|
Data Structures | |
struct | vlc_thread |
struct | vlc_threadvar |
Macros | |
#define | _DECL_DLLMAIN |
#define | IS_INTERRUPTIBLE (!VLC_WINSTORE_APP || _WIN32_WINNT >= 0x0A00) |
#define | ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 |
#define | LOOKUP(s) (((s##_) = (void *)GetProcAddress(h, #s)) != NULL) |
Functions | |
int | vlc_threadvar_create (vlc_threadvar_t *p_tls, void(*destr)(void *)) |
Allocates a thread-specific variable. More... | |
void | vlc_threadvar_delete (vlc_threadvar_t *p_tls) |
Deallocates a thread-specific variable. More... | |
int | vlc_threadvar_set (vlc_threadvar_t key, void *value) |
Sets a thread-specific variable. More... | |
void * | vlc_threadvar_get (vlc_threadvar_t key) |
Gets the value of a thread-local variable for the calling thread. More... | |
static void | vlc_threadvars_cleanup (void) |
void | vlc_atomic_wait (void *addr, unsigned val) |
Waits on an address. More... | |
int | vlc_atomic_timedwait (void *addr, unsigned val, vlc_tick_t deadline) |
Waits on an address with a time-out. More... | |
int | vlc_atomic_timedwait_daytime (void *addr, unsigned val, time_t deadline) |
void | vlc_atomic_notify_one (void *addr) |
Wakes up one thread on an address. More... | |
void | vlc_atomic_notify_all (void *addr) |
Wakes up all thread on an address. More... | |
static void | vlc_thread_destroy (vlc_thread_t th) |
static unsigned __stdcall | vlc_entry (void *p) |
static int | vlc_clone_attr (vlc_thread_t *p_handle, bool detached, void *(*entry)(void *), void *data, int priority) |
int | vlc_clone (vlc_thread_t *p_handle, void *(*entry)(void *), void *data, int priority) |
Creates and starts a new thread. More... | |
void | vlc_join (vlc_thread_t th, void **result) |
Waits for a thread to complete (if needed), then destroys it. More... | |
int | vlc_clone_detach (vlc_thread_t *p_handle, void *(*entry)(void *), void *data, int priority) |
unsigned long | vlc_thread_id (void) |
Thread identifier. More... | |
int | vlc_set_priority (vlc_thread_t th, int priority) |
static void CALLBACK | vlc_cancel_self (ULONG_PTR self) |
void | vlc_cancel (vlc_thread_t th) |
Marks a thread as cancelled. More... | |
int | vlc_savecancel (void) |
Disables thread cancellation. More... | |
void | vlc_restorecancel (int state) |
Restores the cancellation state. More... | |
void | vlc_testcancel (void) |
Issues an explicit deferred cancellation point. More... | |
void | vlc_control_cancel (vlc_cleanup_t *cleaner) |
Internal handler for thread cancellation. More... | |
void | vlc_cancel_addr_set (atomic_uint *addr) |
void | vlc_cancel_addr_clear (atomic_uint *addr) |
static vlc_tick_t | mdate_interrupt (void) |
static vlc_tick_t | mdate_tick (void) |
static vlc_tick_t | mdate_multimedia (void) |
static vlc_tick_t | mdate_perf (void) |
static vlc_tick_t | mdate_wall (void) |
static vlc_tick_t | mdate_default (void) |
vlc_tick_t | vlc_tick_now (void) |
Precision monotonic clock. More... | |
static BOOL | SelectClockSource (vlc_object_t *obj) |
unsigned | vlc_GetCPUCount (void) |
Count CPUs. More... | |
void | vlc_threads_setup (libvlc_int_t *vlc) |
BOOL WINAPI | DllMain (HANDLE hinstDll, DWORD fdwReason, LPVOID lpvReserved) |
Variables | |
static CRITICAL_SECTION | super_mutex |
static CONDITION_VARIABLE | super_variable |
static DWORD | thread_key |
struct vlc_threadvar * | vlc_threadvar_last = NULL |
union { | |
struct { | |
LARGE_INTEGER freq | |
} perf | |
struct { | |
UINT cbtc | |
} multimedia | |
} | clk |
static vlc_tick_t(* | mdate_selected )(void) = mdate_default |
static CRITICAL_SECTION | setup_lock |
vlc_rwlock_t | config_lock |
#define _DECL_DLLMAIN |
#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 |
Referenced by vlc_threads_setup().
#define IS_INTERRUPTIBLE (!VLC_WINSTORE_APP || _WIN32_WINNT >= 0x0A00) |
BOOL WINAPI DllMain | ( | HANDLE | hinstDll, |
DWORD | fdwReason, | ||
LPVOID | lpvReserved | ||
) |
References LOOKUP, super_mutex, super_variable, thread_key, unlikely, vlc_rwlock_destroy(), vlc_rwlock_init(), and vlc_threadvars_cleanup().
|
static |
References mdate_perf(), and vlc_threads_setup().
Referenced by vlc_threads_setup().
|
static |
References CLOCK_FREQ, static_assert, and unlikely.
Referenced by SelectClockSource().
|
static |
References clk, CLOCK_FREQ, static_assert, and VLC_TICK_FROM_MS.
Referenced by SelectClockSource().
|
static |
References clk, and vlc_tick_from_frac().
Referenced by mdate_default(), and SelectClockSource().
|
static |
References CLOCK_FREQ, static_assert, and VLC_TICK_FROM_MS.
Referenced by SelectClockSource().
|
static |
References CLOCK_FREQ, static_assert, and VLC_TICK_FROM_MSFTIME.
Referenced by SelectClockSource().
|
static |
References clk, mdate_interrupt(), mdate_multimedia(), mdate_perf(), mdate_selected, mdate_tick(), mdate_wall(), msg_Dbg, msg_Err, name, perf, and var_InheritString().
Referenced by vlc_threads_setup().
|
static |
Referenced by vlc_cancel().
|
static |
References vlc_thread::addr, vlc_thread::cleaners, vlc_thread::data, vlc_thread::entry, vlc_thread::id, vlc_thread::killable, vlc_thread::killed, vlc_thread::lock, unlikely, vlc_entry(), and vlc_thread::wait.
Referenced by vlc_clone(), and vlc_clone_detach().
int vlc_clone_detach | ( | vlc_thread_t * | p_handle, |
void *(*)(void *) | entry, | ||
void * | data, | ||
int | priority | ||
) |
References vlc_clone_attr().
|
static |
References vlc_thread::data, vlc_thread::entry, vlc_thread::id, vlc_thread::killable, p, thread_key, and vlc_thread_destroy().
Referenced by vlc_clone_attr().
int vlc_set_priority | ( | vlc_thread_t | th, |
int | priority | ||
) |
References VLC_EGENERIC, and VLC_SUCCESS.
|
static |
Referenced by vlc_entry(), vlc_join(), and vlc_testcancel().
void vlc_threads_setup | ( | libvlc_int_t * | vlc | ) |
References ABOVE_NORMAL_PRIORITY_CLASS, mdate_default(), mdate_selected, msg_Dbg, SelectClockSource(), var_InheritBool(), and VLC_OBJECT.
|
static |
References vlc_thread::addr, ARRAY_SIZE, vlc_thread::lock, vlc_threadvar::prev, super_mutex, vlc_assert_unreachable, vlc_threadvar_get(), vlc_threadvar_last, vlc_threadvar_set(), and vlc_thread::wait.
Referenced by DllMain().
UINT cbtc |
union { ... } clk |
Referenced by mdate_multimedia(), mdate_perf(), and SelectClockSource().
vlc_rwlock_t config_lock |
Referenced by config_GetFloat(), config_GetInt(), config_GetPsz(), config_PutFloat(), config_PutInt(), config_PutPsz(), and config_ResetAll().
LARGE_INTEGER freq |
Referenced by vlc_tick_now().
|
static |
Referenced by SelectClockSource(), vlc_threads_setup(), and vlc_tick_now().
struct { ... } multimedia |
struct { ... } perf |
Referenced by SelectClockSource().
|
static |
|
static |
Referenced by DllMain(), vlc_threadvar_create(), vlc_threadvar_delete(), and vlc_threadvars_cleanup().
|
static |
Referenced by DllMain().
|
static |
struct vlc_threadvar * vlc_threadvar_last = NULL |