[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>
This commit is contained in:
parent
8e367065ee
commit
f206aabb03
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user