26 #ifndef AVCODEC_OS2PTHREADS_H
27 #define AVCODEC_OS2PTHREADS_H
32 #undef __STRICT_ANSI__
51 void *(*start_routine)(
void *);
68 thread_arg =
av_mallocz(
sizeof(
struct thread_arg));
82 DosWaitThread((PTID)&thread, DCWW_WAIT);
89 DosCreateMutexSem(
NULL, (PHMTX)mutex, 0,
FALSE);
96 DosCloseMutexSem(*(PHMTX)mutex);
103 DosRequestMutexSem(*(PHMTX)mutex, SEM_INDEFINITE_WAIT);
110 DosReleaseMutexSem(*(PHMTX)mutex);
159 DosWaitEventSem(cond->
event_sem, SEM_INDEFINITE_WAIT);
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
static void thread_entry(void *arg)
static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
memory handling functions
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
void *(* start_routine)(void *)
static av_always_inline int pthread_cond_signal(pthread_cond_t *cond)
static av_always_inline int pthread_join(pthread_t thread, void **value_ptr)
static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
static pthread_mutex_t * mutex
static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond)
static av_always_inline int pthread_mutex_unlock(pthread_mutex_t *mutex)
static av_always_inline int pthread_mutex_lock(pthread_mutex_t *mutex)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...