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
e228d34c
Commit
e228d34c
authored
Jan 23, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline vlc_poll()
parent
e63dd4e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
39 deletions
+18
-39
include/vlc_fixups.h
include/vlc_fixups.h
+0
-3
include/vlc_network.h
include/vlc_network.h
+0
-4
include/vlc_threads.h
include/vlc_threads.h
+18
-0
src/os2/thread.c
src/os2/thread.c
+0
-16
src/win32/thread.c
src/win32/thread.c
+0
-16
No files found.
include/vlc_fixups.h
View file @
e228d34c
...
@@ -274,9 +274,6 @@ struct pollfd
...
@@ -274,9 +274,6 @@ struct pollfd
unsigned
revents
;
unsigned
revents
;
};
};
#endif
#endif
#ifndef HAVE_POLL
# define poll(a, b, c) vlc_poll(a, b, c)
#endif
#ifndef HAVE_IF_NAMEINDEX
#ifndef HAVE_IF_NAMEINDEX
#include <errno.h>
#include <errno.h>
...
...
include/vlc_network.h
View file @
e228d34c
...
@@ -160,10 +160,6 @@ VLC_API ssize_t net_Printf( vlc_object_t *p_this, int fd, const v_socket_t *, co
...
@@ -160,10 +160,6 @@ VLC_API ssize_t net_Printf( vlc_object_t *p_this, int fd, const v_socket_t *, co
VLC_API
ssize_t
net_vaPrintf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
);
VLC_API
ssize_t
net_vaPrintf
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
);
#define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
#define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
struct
pollfd
;
VLC_API
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
);
#ifdef WIN32
#ifdef WIN32
/* Microsoft: same semantic, same value, different name... go figure */
/* Microsoft: same semantic, same value, different name... go figure */
# define SHUT_RD SD_RECEIVE
# define SHUT_RD SD_RECEIVE
...
...
include/vlc_threads.h
View file @
e228d34c
...
@@ -396,6 +396,24 @@ struct vlc_cleanup_t
...
@@ -396,6 +396,24 @@ struct vlc_cleanup_t
vlc_cleanup_data.proc (vlc_cleanup_data.data); \
vlc_cleanup_data.proc (vlc_cleanup_data.data); \
} while (0)
} while (0)
/* poll() with cancellation */
static
inline
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
vlc_testcancel
();
while
(
timeout
>
50
)
{
int
val
=
poll
(
fds
,
nfds
,
timeout
);
if
(
val
!=
0
)
return
val
;
timeout
-=
50
;
vlc_testcancel
();
}
return
poll
(
fds
,
nfds
,
timeout
);
}
# define poll(u,n,t) vlc_poll(u, n, t)
#endif
/* LIBVLC_USE_PTHREAD_CANCEL */
#endif
/* LIBVLC_USE_PTHREAD_CANCEL */
static
inline
void
vlc_cleanup_lock
(
void
*
lock
)
static
inline
void
vlc_cleanup_lock
(
void
*
lock
)
...
...
src/os2/thread.c
View file @
e228d34c
...
@@ -805,22 +805,6 @@ void vlc_control_cancel (int cmd, ...)
...
@@ -805,22 +805,6 @@ void vlc_control_cancel (int cmd, ...)
va_end
(
ap
);
va_end
(
ap
);
}
}
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
vlc_testcancel
();
while
(
timeout
>
50
)
{
int
val
=
poll
(
fds
,
nfds
,
timeout
);
if
(
val
!=
0
)
return
val
;
timeout
-=
50
;
vlc_testcancel
();
}
return
poll
(
fds
,
nfds
,
timeout
);
}
#define Q2LL( q ) ( *( long long * )&( q ))
#define Q2LL( q ) ( *( long long * )&( q ))
/*** Clock ***/
/*** Clock ***/
...
...
src/win32/thread.c
View file @
e228d34c
...
@@ -777,22 +777,6 @@ void vlc_control_cancel (int cmd, ...)
...
@@ -777,22 +777,6 @@ void vlc_control_cancel (int cmd, ...)
va_end
(
ap
);
va_end
(
ap
);
}
}
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
vlc_testcancel
();
while
(
timeout
>
50
)
{
int
val
=
poll
(
fds
,
nfds
,
timeout
);
if
(
val
!=
0
)
return
val
;
timeout
-=
50
;
vlc_testcancel
();
}
return
poll
(
fds
,
nfds
,
timeout
);
}
/*** Clock ***/
/*** Clock ***/
mtime_t
mdate
(
void
)
mtime_t
mdate
(
void
)
{
{
...
...
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