diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-03-27 01:14:33 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 08:44:38 -0800 |
commit | f206aabb035318ac4bafbf0b87798335de3634df (patch) | |
tree | 0fac4b6f593af478f0792e6c94f0881fd81645cd /arch/um/os-Linux/sigio.c | |
parent | [PATCH] uml: move SIGIO startup code to os-Linux/start_up.c (diff) | |
download | linux-dev-f206aabb035318ac4bafbf0b87798335de3634df.tar.xz linux-dev-f206aabb035318ac4bafbf0b87798335de3634df.zip |
[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 '')
-rw-r--r-- | arch/um/os-Linux/sigio.c (renamed from arch/um/kernel/sigio_user.c) | 16 |
1 files changed, 8 insertions, 8 deletions
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; } |