mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Revert "w32pthread: help compiler figure out undeeded code"
This reverts commit 4622f11f9c
.
The compiler should be able to do the dead code elimination now
without this when the cond_* names point directly to the real
functions instead of to local function pointers.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
4332bf98dc
commit
ef51692a49
@ -136,7 +136,7 @@ typedef struct win32_cond_t {
|
|||||||
static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
|
static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
|
||||||
{
|
{
|
||||||
win32_cond_t *win32_cond = NULL;
|
win32_cond_t *win32_cond = NULL;
|
||||||
if (_WIN32_WINNT >= 0x0600 || cond_init) {
|
if (cond_init) {
|
||||||
cond_init(cond);
|
cond_init(cond);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ static void pthread_cond_destroy(pthread_cond_t *cond)
|
|||||||
{
|
{
|
||||||
win32_cond_t *win32_cond = cond->ptr;
|
win32_cond_t *win32_cond = cond->ptr;
|
||||||
/* native condition variables do not destroy */
|
/* native condition variables do not destroy */
|
||||||
if (_WIN32_WINNT >= 0x0600 || cond_init)
|
if (cond_init)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* non native condition variables */
|
/* non native condition variables */
|
||||||
@ -178,7 +178,7 @@ static void pthread_cond_broadcast(pthread_cond_t *cond)
|
|||||||
win32_cond_t *win32_cond = cond->ptr;
|
win32_cond_t *win32_cond = cond->ptr;
|
||||||
int have_waiter;
|
int have_waiter;
|
||||||
|
|
||||||
if (_WIN32_WINNT >= 0x0600 || cond_broadcast) {
|
if (cond_broadcast) {
|
||||||
cond_broadcast(cond);
|
cond_broadcast(cond);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ static int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
|||||||
{
|
{
|
||||||
win32_cond_t *win32_cond = cond->ptr;
|
win32_cond_t *win32_cond = cond->ptr;
|
||||||
int last_waiter;
|
int last_waiter;
|
||||||
if (_WIN32_WINNT >= 0x0600 || cond_wait) {
|
if (cond_wait) {
|
||||||
cond_wait(cond, mutex, INFINITE);
|
cond_wait(cond, mutex, INFINITE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -240,7 +240,7 @@ static void pthread_cond_signal(pthread_cond_t *cond)
|
|||||||
{
|
{
|
||||||
win32_cond_t *win32_cond = cond->ptr;
|
win32_cond_t *win32_cond = cond->ptr;
|
||||||
int have_waiter;
|
int have_waiter;
|
||||||
if (_WIN32_WINNT >= 0x0600 || cond_signal) {
|
if (cond_signal) {
|
||||||
cond_signal(cond);
|
cond_signal(cond);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user