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
7f42234c
Commit
7f42234c
authored
Dec 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maemo: work-around segmentation fault when poll() unwinds
(This seems like a toolchain bug)
parent
91550604
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
1 deletion
+54
-1
bin/vlc.c
bin/vlc.c
+14
-0
include/vlc_fixups.h
include/vlc_fixups.h
+4
-0
src/misc/pthread.c
src/misc/pthread.c
+3
-0
src/network/poll.c
src/network/poll.c
+33
-1
No files found.
bin/vlc.c
View file @
7f42234c
...
...
@@ -50,6 +50,13 @@ extern void vlc_enable_override (void);
#include <unistd.h>
#include <dlfcn.h>
#ifdef HAVE_MAEMO
static
void
dummy_handler
(
int
signum
)
{
(
void
)
signum
;
}
#endif
/*****************************************************************************
* main: parse command line, start interface and spawn threads.
*****************************************************************************/
...
...
@@ -132,6 +139,13 @@ int main( int i_argc, const char *ppsz_argv[] )
sigemptyset
(
&
set
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
sigs
)
/
sizeof
(
sigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
sigs
[
i
]);
#ifdef HAVE_MAEMO
sigaddset
(
&
set
,
SIGRTMIN
);
{
struct
sigaction
act
=
{
.
sa_handler
=
dummy_handler
,
};
sigaction
(
SIGRTMIN
,
&
act
,
NULL
);
}
#endif
/* Block all these signals */
pthread_sigmask
(
SIG_BLOCK
,
&
set
,
NULL
);
...
...
include/vlc_fixups.h
View file @
7f42234c
...
...
@@ -241,6 +241,10 @@ struct pollfd
};
# define poll(a, b, c) vlc_poll(a, b, c)
#elif defined (HAVE_MAEMO)
# include <poll.h>
# define poll(a, b, c) vlc_poll(a, b, c)
int
vlc_poll
(
struct
pollfd
*
,
unsigned
,
int
);
#endif
#ifndef HAVE_TDESTROY
...
...
src/misc/pthread.c
View file @
7f42234c
...
...
@@ -688,6 +688,9 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
void
vlc_cancel
(
vlc_thread_t
thread_id
)
{
pthread_cancel
(
thread_id
);
#ifdef HAVE_MAEMO
pthread_kill
(
thread_id
,
SIGRTMIN
);
#endif
}
/**
...
...
src/network/poll.c
View file @
7f42234c
...
...
@@ -30,7 +30,39 @@
#include <vlc_network.h>
#ifdef HAVE_POLL
#if HAVE_MAEMO
# include <signal.h>
# include <errno.h>
# include <poll.h>
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
struct
timespec
tsbuf
,
*
ts
;
sigset_t
set
;
int
canc
,
ret
;
if
(
timeout
!=
-
1
)
{
div_t
d
=
div
(
timeout
,
1000
);
tsbuf
.
tv_sec
=
d
.
quot
;
tsbuf
.
tv_nsec
=
d
.
rem
*
1000000
;
ts
=
&
tsbuf
;
}
else
ts
=
NULL
;
pthread_sigmask
(
SIG_BLOCK
,
NULL
,
&
set
);
sigdelset
(
&
set
,
SIGRTMIN
);
canc
=
vlc_savecancel
();
ret
=
ppoll
(
fds
,
nfds
,
ts
,
&
set
);
vlc_restorecancel
(
canc
);
vlc_testcancel
();
return
ret
;
}
#elif defined (HAVE_POLL)
struct
pollfd
;
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
...
...
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