mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
[libvpx] Update to v1.8.1 from https://chromium.googlesource.com/webm/libvpx
This commit is contained in:
committed by
Andrey Volk
parent
34fcadbd53
commit
ceb051af4e
@@ -12,8 +12,8 @@
|
||||
// Original source:
|
||||
// https://chromium.googlesource.com/webm/libwebp
|
||||
|
||||
#ifndef VPX_THREAD_H_
|
||||
#define VPX_THREAD_H_
|
||||
#ifndef VPX_VPX_UTIL_VPX_THREAD_H_
|
||||
#define VPX_VPX_UTIL_VPX_THREAD_H_
|
||||
|
||||
#include "./vpx_config.h"
|
||||
|
||||
@@ -159,6 +159,23 @@ static INLINE int pthread_cond_init(pthread_cond_t *const condition,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INLINE int pthread_cond_broadcast(pthread_cond_t *const condition) {
|
||||
int ok = 1;
|
||||
#ifdef USE_WINDOWS_CONDITION_VARIABLE
|
||||
WakeAllConditionVariable(condition);
|
||||
#else
|
||||
while (WaitForSingleObject(condition->waiting_sem_, 0) == WAIT_OBJECT_0) {
|
||||
// a thread is waiting in pthread_cond_wait: allow it to be notified
|
||||
ok &= SetEvent(condition->signal_event_);
|
||||
// wait until the event is consumed so the signaler cannot consume
|
||||
// the event via its own pthread_cond_wait.
|
||||
ok &= (WaitForSingleObject(condition->received_sem_, INFINITE) !=
|
||||
WAIT_OBJECT_0);
|
||||
}
|
||||
#endif
|
||||
return !ok;
|
||||
}
|
||||
|
||||
static INLINE int pthread_cond_signal(pthread_cond_t *const condition) {
|
||||
int ok = 1;
|
||||
#ifdef USE_WINDOWS_CONDITION_VARIABLE
|
||||
@@ -194,6 +211,7 @@ static INLINE int pthread_cond_wait(pthread_cond_t *const condition,
|
||||
#endif
|
||||
return !ok;
|
||||
}
|
||||
|
||||
#elif defined(__OS2__)
|
||||
#define INCL_DOS
|
||||
#include <os2.h> // NOLINT
|
||||
@@ -202,6 +220,11 @@ static INLINE int pthread_cond_wait(pthread_cond_t *const condition,
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <sys/builtin.h> // NOLINT
|
||||
|
||||
#if defined(__STRICT_ANSI__)
|
||||
// _beginthread() is not declared on __STRICT_ANSI__ mode. Declare here.
|
||||
int _beginthread(void (*)(void *), void *, unsigned, void *);
|
||||
#endif
|
||||
|
||||
#define pthread_t TID
|
||||
#define pthread_mutex_t HMTX
|
||||
|
||||
@@ -412,4 +435,4 @@ const VPxWorkerInterface *vpx_get_worker_interface(void);
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_THREAD_H_
|
||||
#endif // VPX_VPX_UTIL_VPX_THREAD_H_
|
||||
|
Reference in New Issue
Block a user