aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/sigio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/sigio.c')
-rw-r--r--arch/um/os-Linux/sigio.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index d22623e8fced..0ecac563c7b3 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -43,13 +43,13 @@ struct pollfds {
43/* Protected by sigio_lock(). Used by the sigio thread, but the UML thread 43/* Protected by sigio_lock(). Used by the sigio thread, but the UML thread
44 * synchronizes with it. 44 * synchronizes with it.
45 */ 45 */
46struct pollfds current_poll = { 46static struct pollfds current_poll = {
47 .poll = NULL, 47 .poll = NULL,
48 .size = 0, 48 .size = 0,
49 .used = 0 49 .used = 0
50}; 50};
51 51
52struct pollfds next_poll = { 52static struct pollfds next_poll = {
53 .poll = NULL, 53 .poll = NULL,
54 .size = 0, 54 .size = 0,
55 .used = 0 55 .used = 0
@@ -156,7 +156,7 @@ static void update_thread(void)
156 set_signals(flags); 156 set_signals(flags);
157} 157}
158 158
159int add_sigio_fd(int fd, int read) 159static int add_sigio_fd(int fd, int read)
160{ 160{
161 int err = 0, i, n, events; 161 int err = 0, i, n, events;
162 162
@@ -333,10 +333,12 @@ void maybe_sigio_broken(int fd, int read)
333 add_sigio_fd(fd, read); 333 add_sigio_fd(fd, read);
334} 334}
335 335
336void sigio_cleanup(void) 336static void sigio_cleanup(void)
337{ 337{
338 if(write_sigio_pid != -1){ 338 if(write_sigio_pid != -1){
339 os_kill_process(write_sigio_pid, 1); 339 os_kill_process(write_sigio_pid, 1);
340 write_sigio_pid = -1; 340 write_sigio_pid = -1;
341 } 341 }
342} 342}
343
344__uml_exitcall(sigio_cleanup);