Skip to content

Commit 3a24ebf

Browse files
cfd-36Linus Torvalds
authored andcommitted
uml: remove init_irq_signals
init_irq_signals doesn't need to be called from the context of a new process. It initializes handlers, which are useless in process context. With that call gone, init_irq_signals has only one caller, so it can be inlined into init_new_thread_signals. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cfef8f3 commit 3a24ebf

3 files changed

Lines changed: 4 additions & 13 deletions

File tree

‎arch/um/include/os.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ extern void os_free_irq_later(struct irq_fd *active_fds,
285285
extern int os_get_pollfd(int i);
286286
extern void os_set_pollfd(int i, int fd);
287287
extern void os_set_ioignore(void);
288-
extern void init_irq_signals(int on_sigstack);
289288

290289
/* sigio.c */
291290
extern int add_sigio_fd(int fd);

‎arch/um/os-Linux/irq.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,3 @@ void os_set_ioignore(void)
136136
{
137137
signal(SIGIO, SIG_IGN);
138138
}
139-
140-
void init_irq_signals(int on_sigstack)
141-
{
142-
int flags;
143-
144-
flags = on_sigstack ? SA_ONSTACK : 0;
145-
146-
set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART,
147-
SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
148-
signal(SIGWINCH, SIG_IGN);
149-
}

‎arch/um/os-Linux/process.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ void init_new_thread_signals(void)
249249
SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1);
250250
signal(SIGHUP, SIG_IGN);
251251

252-
init_irq_signals(1);
252+
set_handler(SIGIO, (__sighandler_t) sig_handler,
253+
SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM,
254+
SIGVTALRM, -1);
255+
signal(SIGWINCH, SIG_IGN);
253256
}
254257

255258
int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr)

0 commit comments

Comments
 (0)