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));
73 *thread = _beginthread(
thread_entry, NULL, 256 * 1024, thread_arg);
80 DosWaitThread((PTID)&thread, DCWW_WAIT);
87 DosCreateMutexSem(NULL, (PHMTX)mutex, 0,
FALSE);
94 DosCloseMutexSem(*(PHMTX)mutex);
101 DosRequestMutexSem(*(PHMTX)mutex, SEM_INDEFINITE_WAIT);
108 DosReleaseMutexSem(*(PHMTX)mutex);
157 DosWaitEventSem(cond->
event_sem, SEM_INDEFINITE_WAIT);