VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
thread.c File Reference
Include dependency graph for thread.c:

Data Structures

struct  vlc_thread
 Per-thread data. More...
struct  vlc_threadvar
struct  vlc_timer

Macros

#define Q2LL(q)   ( *( long long * )&( q ))

Enumerations

enum  { CLOCK_REALTIME = 0, CLOCK_MONOTONIC }

Functions

static void vlc_cancel_self (PVOID dummy)
static ULONG vlc_DosWaitEventSemEx (HEV hev, ULONG ulTimeout, BOOL fCancelable)
static ULONG vlc_WaitForSingleObject (HEV hev, ULONG ulTimeout)
static ULONG vlc_Sleep (ULONG ulTimeout)
int _CRT_init (void)
void _CRT_term (void)
unsigned long _System _DLL_InitTerm (unsigned long, unsigned long)
void vlc_mutex_init (vlc_mutex_t *p_mutex)
void vlc_mutex_init_recursive (vlc_mutex_t *p_mutex)
void vlc_mutex_destroy (vlc_mutex_t *p_mutex)
void vlc_mutex_lock (vlc_mutex_t *p_mutex)
int vlc_mutex_trylock (vlc_mutex_t *p_mutex)
void vlc_mutex_unlock (vlc_mutex_t *p_mutex)
static void vlc_cond_init_common (vlc_cond_t *p_condvar, unsigned clock)
void vlc_cond_init (vlc_cond_t *p_condvar)
void vlc_cond_init_daytime (vlc_cond_t *p_condvar)
void vlc_cond_destroy (vlc_cond_t *p_condvar)
void vlc_cond_signal (vlc_cond_t *p_condvar)
void vlc_cond_broadcast (vlc_cond_t *p_condvar)
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, mtime_t deadline)
int vlc_threadvar_create (vlc_threadvar_t *p_tls, void(*destr)(void *))
void vlc_threadvar_delete (vlc_threadvar_t *p_tls)
int vlc_threadvar_set (vlc_threadvar_t key, void *value)
void * vlc_threadvar_get (vlc_threadvar_t key)
void vlc_threads_setup (libvlc_int_t *p_libvlc)
static void vlc_thread_cleanup (struct vlc_thread *th)
static void 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)
void vlc_join (vlc_thread_t th, void **result)
int vlc_clone_detach (vlc_thread_t *p_handle, void *(*entry)(void *), void *data, int priority)
int vlc_set_priority (vlc_thread_t th, int priority)
void vlc_cancel (vlc_thread_t thread_id)
int vlc_savecancel (void)
void vlc_restorecancel (int state)
void vlc_testcancel (void)
void vlc_control_cancel (int cmd,...)
static int vlc_select (int nfds, fd_set *rdset, fd_set *wrset, fd_set *exset, struct timeval *timeout)
int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
mtime_t mdate (void)
void mwait ((mtime_t deadline))
void msleep ((mtime_t delay))
static void vlc_timer_do (void *arg)
int vlc_timer_create (vlc_timer_t *id, void(*func)(void *), void *data)
void vlc_timer_destroy (vlc_timer_t timer)
void vlc_timer_schedule (vlc_timer_t timer, bool absolute, mtime_t value, mtime_t interval)
unsigned vlc_timer_getoverrun (vlc_timer_t timer)
unsigned vlc_GetCPUCount (void)

Variables

static vlc_threadvar_t thread_key
static vlc_mutex_t super_mutex
static vlc_cond_t super_variable
vlc_rwlock_t config_lock
vlc_rwlock_t msg_lock
 Store all data required by messages interfaces.
struct vlc_threadvarvlc_threadvar_last

Macro Definition Documentation

#define Q2LL (   q)    ( *( long long * )&( q ))

Referenced by mdate().

Enumeration Type Documentation

anonymous enum
Enumerator:
CLOCK_REALTIME 
CLOCK_MONOTONIC 

Function Documentation

int _CRT_init ( void  )

Referenced by _DLL_InitTerm().

void _CRT_term ( void  )

Referenced by _DLL_InitTerm().

unsigned long _System _DLL_InitTerm ( unsigned long  hmod,
unsigned long  flag 
)
mtime_t mdate ( void  )
void msleep ( (mtime_t delay)  )

References mdate(), and mwait.

void mwait ( (mtime_t deadline)  )
void vlc_cancel ( vlc_thread_t  thread_id)
static void vlc_cancel_self ( PVOID  dummy)
static

References vlc_thread::killed, and likely.

Referenced by vlc_DosWaitEventSemEx(), and vlc_testcancel().

int vlc_clone ( vlc_thread_t p_handle,
void *(*)(void *)  entry,
void *  data,
int  priority 
)

References vlc_clone_attr().

static int vlc_clone_attr ( vlc_thread_t p_handle,
bool  detached,
void *(*)(void *)  entry,
void *  data,
int  priority 
)
static
int vlc_clone_detach ( vlc_thread_t p_handle,
void *(*)(void *)  entry,
void *  data,
int  priority 
)

References vlc_clone_attr().

void vlc_cond_broadcast ( vlc_cond_t p_condvar)
void vlc_cond_destroy ( vlc_cond_t p_condvar)
void vlc_cond_init ( vlc_cond_t p_condvar)
static void vlc_cond_init_common ( vlc_cond_t p_condvar,
unsigned  clock 
)
static
void vlc_cond_init_daytime ( vlc_cond_t p_condvar)
void vlc_cond_signal ( vlc_cond_t p_condvar)

References vlc_cond_broadcast().

int vlc_cond_timedwait ( vlc_cond_t p_condvar,
vlc_mutex_t p_mutex,
mtime_t  deadline 
)
void vlc_cond_wait ( vlc_cond_t p_condvar,
vlc_mutex_t p_mutex 
)
void vlc_control_cancel ( int  cmd,
  ... 
)
static ULONG vlc_DosWaitEventSemEx ( HEV  hev,
ULONG  ulTimeout,
BOOL  fCancelable 
)
static
static void vlc_entry ( void *  p)
static
unsigned vlc_GetCPUCount ( void  )
void vlc_join ( vlc_thread_t  th,
void **  result 
)
void vlc_mutex_destroy ( vlc_mutex_t p_mutex)
void vlc_mutex_init ( vlc_mutex_t p_mutex)
void vlc_mutex_init_recursive ( vlc_mutex_t p_mutex)
void vlc_mutex_lock ( vlc_mutex_t p_mutex)
int vlc_mutex_trylock ( vlc_mutex_t p_mutex)
void vlc_mutex_unlock ( vlc_mutex_t p_mutex)
int vlc_poll ( struct pollfd fds,
unsigned  nfds,
int  timeout 
)
void vlc_restorecancel ( int  state)
int vlc_savecancel ( void  )
static int vlc_select ( int  nfds,
fd_set *  rdset,
fd_set *  wrset,
fd_set *  exset,
struct timeval *  timeout 
)
static
int vlc_set_priority ( vlc_thread_t  th,
int  priority 
)

< Unspecified error

< No error

References VLC_EGENERIC, and VLC_SUCCESS.

static ULONG vlc_Sleep ( ULONG  ulTimeout)
static

References vlc_DosWaitEventSemEx().

Referenced by mwait().

void vlc_testcancel ( void  )
static void vlc_thread_cleanup ( struct vlc_thread th)
static
void vlc_threads_setup ( libvlc_int_t p_libvlc)
int vlc_threadvar_create ( vlc_threadvar_t p_tls,
void(*)(void *)  destr 
)
void vlc_threadvar_delete ( vlc_threadvar_t p_tls)
void* vlc_threadvar_get ( vlc_threadvar_t  key)
int vlc_threadvar_set ( vlc_threadvar_t  key,
void *  value 
)
int vlc_timer_create ( vlc_timer_t id,
void(*)(void *)  func,
void *  data 
)

Referenced by main().

void vlc_timer_destroy ( vlc_timer_t  timer)

Referenced by main().

static void vlc_timer_do ( void *  arg)
static
unsigned vlc_timer_getoverrun ( vlc_timer_t  timer)

Referenced by callback(), and main().

void vlc_timer_schedule ( vlc_timer_t  timer,
bool  absolute,
mtime_t  value,
mtime_t  interval 
)

Referenced by main().

static ULONG vlc_WaitForSingleObject ( HEV  hev,
ULONG  ulTimeout 
)
static

Variable Documentation

vlc_rwlock_t config_lock
vlc_rwlock_t msg_lock

Store all data required by messages interfaces.

vlc_mutex_t super_mutex
static
vlc_cond_t super_variable
static
vlc_threadvar_t thread_key
static
struct vlc_threadvar * vlc_threadvar_last