26 #ifndef AVCODEC_OS2PTHREADS_H
27 #define AVCODEC_OS2PTHREADS_H
32 #undef __STRICT_ANSI__
49 void *(*start_routine)(
void *);
66 thread_arg =
av_mallocz(
sizeof(
struct thread_arg));
78 DosWaitThread((PTID)&thread, DCWW_WAIT);
85 DosCreateMutexSem(
NULL, (PHMTX)mutex, 0, FALSE);
92 DosCloseMutexSem(*(PHMTX)mutex);
99 DosRequestMutexSem(*(PHMTX)mutex, SEM_INDEFINITE_WAIT);
106 DosReleaseMutexSem(*(PHMTX)mutex);
113 DosCreateEventSem(
NULL, &cond->
event_sem, DCE_POSTONE, FALSE);
155 DosWaitEventSem(cond->
event_sem, SEM_INDEFINITE_WAIT);