aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-03-27 04:14:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:38 -0500
commitf206aabb035318ac4bafbf0b87798335de3634df (patch)
tree0fac4b6f593af478f0792e6c94f0881fd81645cd /arch/um
parent8e367065eea04a6fde5cb8f3854164af99c45693 (diff)
[PATCH] uml: move sigio_user.c to os-Linux/sigio.c
The serial UML OS-abstraction layer patch (um/kernel dir). This moves sigio_user.c to os-Linux dir Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-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);
311extern void os_set_ioignore(void); 311extern void os_set_ioignore(void);
312extern void init_irq_signals(int on_sigstack); 312extern void init_irq_signals(int on_sigstack);
313 313
314/* sigio.c */
315extern void write_sigio_workaround(void);
316extern int add_sigio_fd(int fd, int read);
317extern int ignore_sigio_fd(int fd);
318
314#endif 319#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 @@
8 8
9extern int write_sigio_irq(int fd); 9extern int write_sigio_irq(int fd);
10extern int register_sigio_fd(int fd); 10extern int register_sigio_fd(int fd);
11extern int add_sigio_fd(int fd, int read);
12extern int ignore_sigio_fd(int fd);
13extern void sigio_lock(void); 11extern void sigio_lock(void);
14extern void sigio_unlock(void); 12extern void sigio_unlock(void);
15 13
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);
58extern void kill_child_dead(int pid); 58extern void kill_child_dead(int pid);
59extern int cont(int pid); 59extern int cont(int pid);
60extern void check_sigio(void); 60extern void check_sigio(void);
61extern void write_sigio_workaround(void);
62extern void arch_check_bugs(void); 61extern void arch_check_bugs(void);
63extern int cpu_feature(char *what, char *buf, int len); 62extern int cpu_feature(char *what, char *buf, int len);
64extern int arch_handle_signal(int sig, union uml_pt_regs *regs); 63extern 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 :=
8 8
9obj-y = config.o exec_kern.o exitcode.o \ 9obj-y = config.o exec_kern.o exitcode.o \
10 init_task.o irq.o ksyms.o mem.o physmem.o \ 10 init_task.o irq.o ksyms.o mem.o physmem.o \
11 process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \ 11 process_kern.o ptrace.o reboot.o resource.o sigio_kern.o \
12 signal_kern.o smp.o syscall_kern.o sysrq.o \ 12 signal_kern.o smp.o syscall_kern.o sysrq.o \
13 time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o 13 time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o
14 14
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 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6obj-y = aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o signal.o \ 6obj-y = aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o sigio.o \
7 start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o user_syms.o \ 7 signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o \
8 util.o drivers/ sys-$(SUBARCH)/ 8 user_syms.o util.o drivers/ sys-$(SUBARCH)/
9 9
10obj-$(CONFIG_MODE_SKAS) += skas/ 10obj-$(CONFIG_MODE_SKAS) += skas/
11 11
12USER_OBJS := aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o \ 12USER_OBJS := aio.o elf_aux.o file.o helper.o irq.o main.o mem.o process.o \
13 signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o util.o 13 sigio.o signal.o start_up.o time.o trap.o tt.o tty.o uaccess.o umid.o \
14 util.o
14 15
15elf_aux.o: $(ARCH_DIR)/kernel-offsets.h 16elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
16CFLAGS_elf_aux.o += -I$(objtree)/arch/um 17CFLAGS_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 @@
20#include "sigio.h" 20#include "sigio.h"
21#include "os.h" 21#include "os.h"
22 22
23/* Protected by sigio_lock(), also used by sigio_cleanup, which is an 23/* Protected by sigio_lock(), also used by sigio_cleanup, which is an
24 * exitcall. 24 * exitcall.
25 */ 25 */
26static int write_sigio_pid = -1; 26static int write_sigio_pid = -1;
@@ -143,7 +143,7 @@ static void update_thread(void)
143 return; 143 return;
144 fail: 144 fail:
145 /* Critical section start */ 145 /* Critical section start */
146 if(write_sigio_pid != -1) 146 if(write_sigio_pid != -1)
147 os_kill_process(write_sigio_pid, 1); 147 os_kill_process(write_sigio_pid, 1);
148 write_sigio_pid = -1; 148 write_sigio_pid = -1;
149 close(sigio_private[0]); 149 close(sigio_private[0]);
@@ -160,13 +160,13 @@ int add_sigio_fd(int fd, int read)
160 160
161 sigio_lock(); 161 sigio_lock();
162 for(i = 0; i < current_poll.used; i++){ 162 for(i = 0; i < current_poll.used; i++){
163 if(current_poll.poll[i].fd == fd) 163 if(current_poll.poll[i].fd == fd)
164 goto out; 164 goto out;
165 } 165 }
166 166
167 n = current_poll.used + 1; 167 n = current_poll.used + 1;
168 err = need_poll(n); 168 err = need_poll(n);
169 if(err) 169 if(err)
170 goto out; 170 goto out;
171 171
172 for(i = 0; i < current_poll.used; i++) 172 for(i = 0; i < current_poll.used; i++)
@@ -195,7 +195,7 @@ int ignore_sigio_fd(int fd)
195 } 195 }
196 if(i == current_poll.used) 196 if(i == current_poll.used)
197 goto out; 197 goto out;
198 198
199 err = need_poll(current_poll.used - 1); 199 err = need_poll(current_poll.used - 1);
200 if(err) 200 if(err)
201 goto out; 201 goto out;
@@ -216,7 +216,7 @@ int ignore_sigio_fd(int fd)
216 return(err); 216 return(err);
217} 217}
218 218
219static struct pollfd* setup_initial_poll(int fd) 219static struct pollfd *setup_initial_poll(int fd)
220{ 220{
221 struct pollfd *p; 221 struct pollfd *p;
222 222
@@ -256,7 +256,7 @@ void write_sigio_workaround(void)
256 } 256 }
257 err = os_pipe(l_sigio_private, 1, 1); 257 err = os_pipe(l_sigio_private, 1, 1);
258 if(err < 0){ 258 if(err < 0){
259 printk("write_sigio_workaround - os_pipe 1 failed, " 259 printk("write_sigio_workaround - os_pipe 2 failed, "
260 "err = %d\n", -err); 260 "err = %d\n", -err);
261 goto out_close1; 261 goto out_close1;
262 } 262 }
@@ -317,7 +317,7 @@ void write_sigio_workaround(void)
317 317
318void sigio_cleanup(void) 318void sigio_cleanup(void)
319{ 319{
320 if (write_sigio_pid != -1) { 320 if(write_sigio_pid != -1){
321 os_kill_process(write_sigio_pid, 1); 321 os_kill_process(write_sigio_pid, 1);
322 write_sigio_pid = -1; 322 write_sigio_pid = -1;
323 } 323 }