summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/include/os.h5
-rw-r--r--arch/um/include/sigio.h2
-rw-r--r--arch/um/include/user_util.h1
-rw-r--r--arch/um/kernel/Makefile2
-rw-r--r--arch/um/os-Linux/Makefile9
-rw-r--r--arch/um/os-Linux/sigio.c (renamed from arch/um/kernel/sigio_user.c)16
6 files changed, 19 insertions, 16 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 6d865d4eade0..53dee8d3cdcc 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -311,4 +311,9 @@ extern void os_set_pollfd(int i, int fd);
extern void os_set_ioignore(void);
extern void init_irq_signals(int on_sigstack);
+/* sigio.c */
+extern void write_sigio_workaround(void);
+extern int add_sigio_fd(int fd, int read);
+extern int ignore_sigio_fd(int fd);
+
#endif
diff --git a/arch/um/include/sigio.h b/arch/um/include/sigio.h
index 1432fcfb3212..fe99ea163c2e 100644
--- a/arch/um/include/sigio.h
+++ b/arch/um/include/sigio.h
@@ -8,8 +8,6 @@
extern int write_sigio_irq(int fd);
extern int register_sigio_fd(int fd);
-extern int add_sigio_fd(int fd, int read);
-extern int ignore_sigio_fd(int fd);
extern void sigio_lock(void);
extern void sigio_unlock(void);
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index a6f1f176cf84..992a7e1e0fca 100644
--- a/arch/um/include/user_util.h
+++ b/arch/um/include/user_util.h
@@ -58,7 +58,6 @@ extern int attach(int pid);
extern void kill_child_dead(int pid);
extern int cont(int pid);
extern void check_sigio(void);
-extern void write_sigio_workaround(void);
extern void arch_check_bugs(void);
extern int cpu_feature(char *what, char *buf, int len);
extern int arch_handle_signal(int sig, union uml_pt_regs *regs);
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 8458c30a6265..ac5afaa0306f 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -8,7 +8,7 @@ clean-files :=
obj-y = config.o exec_kern.o exitcode.o \
init_task.o irq.o ksyms.o mem.o physmem.o \
- process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \
+ process_kern.o ptrace.o reboot.o resource.o sigio_kern.o \
signal_kern.o smp.o syscall_kern.o sysrq.o \
time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
index 73d3d837ed6b..c3d56c2935c2 100644
--- a/arch/um/os-Linux/Makefile
+++ b/arch/um/os-Linux/Makefile
@@ -3,14 +3,15 @@
# Licensed under the GPL
#
-obj-y = aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o signal.o \
- start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o user_syms.o \
- util.o drivers/ sys-$(SUBARCH)/
+obj-y = aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o sigio.o \
+ signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o \
+ user_syms.o util.o drivers/ sys-$(SUBARCH)/
obj-$(CONFIG_MODE_SKAS) += skas/
USER_OBJS := aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o \
- signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o util.o
+ sigio.o signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o \
+ util.o
elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
CFLAGS_elf_aux.o += -I$(objtree)/arch/um
diff --git a/arch/um/kernel/sigio_user.c b/arch/um/os-Linux/sigio.c
index 9bef9413cb5d..7604c404c4c2 100644
--- a/arch/um/kernel/sigio_user.c
+++ b/arch/um/os-Linux/sigio.c
@@ -20,7 +20,7 @@
#include "sigio.h"
#include "os.h"
-/* Protected by sigio_lock(), also used by sigio_cleanup, which is an
+/* Protected by sigio_lock(), also used by sigio_cleanup, which is an
* exitcall.
*/
static int write_sigio_pid = -1;
@@ -143,7 +143,7 @@ static void update_thread(void)
return;
fail:
/* Critical section start */
- if(write_sigio_pid != -1)
+ if(write_sigio_pid != -1)
os_kill_process(write_sigio_pid, 1);
write_sigio_pid = -1;
close(sigio_private[0]);
@@ -160,13 +160,13 @@ int add_sigio_fd(int fd, int read)
sigio_lock();
for(i = 0; i < current_poll.used; i++){
- if(current_poll.poll[i].fd == fd)
+ if(current_poll.poll[i].fd == fd)
goto out;
}
n = current_poll.used + 1;
err = need_poll(n);
- if(err)
+ if(err)
goto out;
for(i = 0; i < current_poll.used; i++)
@@ -195,7 +195,7 @@ int ignore_sigio_fd(int fd)
}
if(i == current_poll.used)
goto out;
-
+
err = need_poll(current_poll.used - 1);
if(err)
goto out;
@@ -216,7 +216,7 @@ int ignore_sigio_fd(int fd)
return(err);
}
-static struct pollfd* setup_initial_poll(int fd)
+static struct pollfd *setup_initial_poll(int fd)
{
struct pollfd *p;
@@ -256,7 +256,7 @@ void write_sigio_workaround(void)
}
err = os_pipe(l_sigio_private, 1, 1);
if(err < 0){
- printk("write_sigio_workaround - os_pipe 1 failed, "
+ printk("write_sigio_workaround - os_pipe 2 failed, "
"err = %d\n", -err);
goto out_close1;
}
@@ -317,7 +317,7 @@ void write_sigio_workaround(void)
void sigio_cleanup(void)
{
- if (write_sigio_pid != -1) {
+ if(write_sigio_pid != -1){
os_kill_process(write_sigio_pid, 1);
write_sigio_pid = -1;
}
OpenPOWER on IntegriCloud