Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
d7e6fd9e
Commit
d7e6fd9e
authored
Sep 07, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: fix vlc_cond_timedwait as well
parent
9219a602
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
21 deletions
+15
-21
include/vlc_threads.h
include/vlc_threads.h
+15
-21
No files found.
include/vlc_threads.h
View file @
d7e6fd9e
...
...
@@ -386,20 +386,14 @@ static inline void __vlc_cond_wait( const char * psz_file, int i_line,
vlc_mutex_lock
(
p_mutex
);
#elif defined( WIN32 )
DWORD
result
;
do
{
vlc_testcancel
();
result
=
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
INFINITE
,
TRUE
);
}
while
(
result
==
WAIT_IO_COMPLETION
);
while
(
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
INFINITE
,
TRUE
)
==
WAIT_IO_COMPLETION
);
/* Reacquire the mutex before returning. */
vlc_mutex_lock
(
p_mutex
);
vlc_testcancel
();
(
void
)
psz_file
;
(
void
)
i_line
;
#endif
...
...
@@ -445,25 +439,25 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
return
(
result
==
WAIT_TIMEOUT
)
?
ETIMEDOUT
:
0
;
#elif defined( WIN32 )
mtime_t
total
;
DWORD
result
=
WAIT_TIMEOUT
;
DWORD
result
;
(
void
)
psz_file
;
(
void
)
i_line
;
vlc_testcancel
();
while
((
total
=
(
deadline
-
mdate
())
>
0
))
do
{
DWORD
delay
=
(
total
>
0x7fffffff
)
?
0x7fffffff
:
total
;
result
=
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
delay
,
TRUE
);
/* Reacquire the mutex before return/cancel. */
vlc_mutex_lock
(
p_mutex
);
if
(
result
==
WAIT_OBJECT_0
)
return
0
;
/* Condition signaled! */
vlc_testcancel
();
mtime_t
total
=
deadline
-
mdate
();
if
(
total
<=
0
)
break
;
DWORD
delay
=
(
total
>
0x7fffffff
)
?
0x7fffffff
:
total
;
result
=
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
delay
,
TRUE
);
}
return
ETIMEDOUT
;
while
(
result
==
WAIT_IO_COMPLETION
);
/* Reacquire the mutex before return/cancel. */
vlc_mutex_lock
(
p_mutex
);
return
(
result
==
WAIT_OBJECT_0
)
?
0
:
ETIMEDOUT
;
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment