FFmpeg
Loading...
Searching...
No Matches
w32pthreads.h File Reference

w32threads to pthreads wrapper More...

#include <windows.h>
#include <process.h>
#include <time.h>
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/wchar_filename.h"

Go to the source code of this file.

Data Structures

struct  pthread_t
 

Macros

#define PTHREAD_MUTEX_INITIALIZER   SRWLOCK_INIT
 
#define PTHREAD_COND_INITIALIZER   CONDITION_VARIABLE_INIT
 
#define InitializeCriticalSection(x)
 
#define WaitForSingleObject(a, b)
 
#define THREADFUNC_RETTYPE   unsigned
 
#define PTHREAD_ONCE_INIT   INIT_ONCE_STATIC_INIT
 

Typedefs

typedef SRWLOCK pthread_mutex_t
 
typedef CONDITION_VARIABLE pthread_cond_t
 
typedef INIT_ONCE pthread_once_t
 

Functions

static av_unused THREADFUNC_RETTYPE __stdcall attribute_align_arg win32thread_worker (void *arg)
 
static av_unused int pthread_create (pthread_t *thread, const void *unused_attr, void *(*start_routine)(void *), void *arg)
 
static av_unused int pthread_join (pthread_t thread, void **value_ptr)
 
static int pthread_mutex_init (pthread_mutex_t *m, void *attr)
 
static int pthread_mutex_destroy (pthread_mutex_t *m)
 
static int pthread_mutex_lock (pthread_mutex_t *m)
 
static int pthread_mutex_unlock (pthread_mutex_t *m)
 
static int pthread_mutex_trylock (pthread_mutex_t *m)
 
static av_unused int pthread_once (pthread_once_t *once_control, void(*init_routine)(void))
 
static int pthread_cond_init (pthread_cond_t *cond, const void *unused_attr)
 
static int pthread_cond_destroy (pthread_cond_t *cond)
 
static int pthread_cond_broadcast (pthread_cond_t *cond)
 
static int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
 
static int pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
 
static int pthread_cond_signal (pthread_cond_t *cond)
 
static int win32_thread_setname (const char *name)
 

Detailed Description

w32threads to pthreads wrapper

Definition in file w32pthreads.h.

Macro Definition Documentation

◆ PTHREAD_MUTEX_INITIALIZER

#define PTHREAD_MUTEX_INITIALIZER   SRWLOCK_INIT

Definition at line 60 of file w32pthreads.h.

◆ PTHREAD_COND_INITIALIZER

#define PTHREAD_COND_INITIALIZER   CONDITION_VARIABLE_INIT

Definition at line 61 of file w32pthreads.h.

◆ InitializeCriticalSection

#define InitializeCriticalSection ( x)
Value:
InitializeCriticalSectionEx(x, 0, 0)

Definition at line 63 of file w32pthreads.h.

◆ WaitForSingleObject

#define WaitForSingleObject ( a,
b )

◆ THREADFUNC_RETTYPE

#define THREADFUNC_RETTYPE   unsigned

Definition at line 69 of file w32pthreads.h.

◆ PTHREAD_ONCE_INIT

#define PTHREAD_ONCE_INIT   INIT_ONCE_STATIC_INIT

Definition at line 152 of file w32pthreads.h.

Typedef Documentation

◆ pthread_mutex_t

typedef SRWLOCK pthread_mutex_t

Definition at line 57 of file w32pthreads.h.

◆ pthread_cond_t

typedef CONDITION_VARIABLE pthread_cond_t

Definition at line 58 of file w32pthreads.h.

◆ pthread_once_t

typedef INIT_ONCE pthread_once_t

Definition at line 151 of file w32pthreads.h.

Function Documentation

◆ win32thread_worker()

static av_unused THREADFUNC_RETTYPE __stdcall attribute_align_arg win32thread_worker ( void * arg)
static

Definition at line 73 of file w32pthreads.h.

Referenced by pthread_create().

◆ pthread_create()

static av_unused int pthread_create ( pthread_t * thread,
const void * unused_attr,
void *(* start_routine )(void *),
void * arg )
static

Definition at line 80 of file w32pthreads.h.

◆ pthread_join()

static av_unused int pthread_join ( pthread_t thread,
void ** value_ptr )
static

Definition at line 109 of file w32pthreads.h.

◆ pthread_mutex_init()

static int pthread_mutex_init ( pthread_mutex_t * m,
void * attr )
inlinestatic

Definition at line 125 of file w32pthreads.h.

◆ pthread_mutex_destroy()

static int pthread_mutex_destroy ( pthread_mutex_t * m)
inlinestatic

Definition at line 130 of file w32pthreads.h.

◆ pthread_mutex_lock()

static int pthread_mutex_lock ( pthread_mutex_t * m)
inlinestatic

Definition at line 135 of file w32pthreads.h.

◆ pthread_mutex_unlock()

static int pthread_mutex_unlock ( pthread_mutex_t * m)
inlinestatic

Definition at line 140 of file w32pthreads.h.

◆ pthread_mutex_trylock()

static int pthread_mutex_trylock ( pthread_mutex_t * m)
inlinestatic

Definition at line 146 of file w32pthreads.h.

◆ pthread_once()

static av_unused int pthread_once ( pthread_once_t * once_control,
void(* init_routine )(void) )
static

Definition at line 154 of file w32pthreads.h.

◆ pthread_cond_init()

static int pthread_cond_init ( pthread_cond_t * cond,
const void * unused_attr )
inlinestatic

Definition at line 164 of file w32pthreads.h.

◆ pthread_cond_destroy()

static int pthread_cond_destroy ( pthread_cond_t * cond)
inlinestatic

Definition at line 171 of file w32pthreads.h.

◆ pthread_cond_broadcast()

static int pthread_cond_broadcast ( pthread_cond_t * cond)
inlinestatic

Definition at line 176 of file w32pthreads.h.

◆ pthread_cond_wait()

static int pthread_cond_wait ( pthread_cond_t * cond,
pthread_mutex_t * mutex )
inlinestatic

Definition at line 182 of file w32pthreads.h.

◆ pthread_cond_timedwait()

static int pthread_cond_timedwait ( pthread_cond_t * cond,
pthread_mutex_t * mutex,
const struct timespec * abstime )
inlinestatic

Definition at line 188 of file w32pthreads.h.

◆ pthread_cond_signal()

static int pthread_cond_signal ( pthread_cond_t * cond)
inlinestatic

Definition at line 204 of file w32pthreads.h.

◆ win32_thread_setname()

static int win32_thread_setname ( const char * name)
inlinestatic

Definition at line 210 of file w32pthreads.h.

Referenced by ff_thread_setname().