Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
46f74073
Commit
46f74073
authored
Jan 04, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use the monotonic clock if CS is missing
This can happen on some POSIX.2001 systems.
parent
dd8fafcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
src/posix/thread.c
src/posix/thread.c
+2
-16
No files found.
src/posix/thread.c
View file @
46f74073
...
...
@@ -83,11 +83,11 @@
#if (_POSIX_TIMERS > 0)
static
unsigned
vlc_clock_prec
;
# if (_POSIX_MONOTONIC_CLOCK > 0)
# if (_POSIX_MONOTONIC_CLOCK > 0)
&& (_POSIX_CLOCK_SELECTION > 0)
/* Compile-time POSIX monotonic clock support */
# define vlc_clock_id (CLOCK_MONOTONIC)
# elif (_POSIX_MONOTONIC_CLOCK == 0)
# elif (_POSIX_MONOTONIC_CLOCK == 0)
&& (_POSIX_CLOCK_SELECTION > 0)
/* Run-time POSIX monotonic clock support (see clock_setup() below) */
static
clockid_t
vlc_clock_id
;
...
...
@@ -457,20 +457,6 @@ void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
int
vlc_cond_timedwait
(
vlc_cond_t
*
p_condvar
,
vlc_mutex_t
*
p_mutex
,
mtime_t
deadline
)
{
#if (_POSIX_MONOTONIC_CLOCK > 0) && (_POSIX_CLOCK_SELECTION < 0)
/* Without clock selection, the real-time clock is used for the absolute
* timeout in pthread_cond_timedwait(). We may need to adjust. */
# error FIXME: breaks vlc_cond_init_daytime()
if
(
vlc_clock_id
!=
CLOCK_REALTIME
)
{
struct
timeval
tv
;
deadline
-=
mdate
();
gettimeofday
(
&
tv
,
NULL
);
deadline
+=
tv
.
tv_sec
*
UINT64_C
(
1000000
)
+
tv
.
tv_usec
;
}
#endif
struct
timespec
ts
=
mtime_to_ts
(
deadline
);
int
val
=
pthread_cond_timedwait
(
p_condvar
,
p_mutex
,
&
ts
);
if
(
val
!=
ETIMEDOUT
)
...
...
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