4 * Licensed under the GPL
13 #include <netinet/in.h>
15 #include <sys/socket.h>
17 #include <sys/param.h>
24 int start_io_thread(unsigned long sp, int *fd_out)
28 err = os_pipe(fds, 1, 1);
30 printk("start_io_thread - os_pipe failed, err = %d\n", -err);
37 err = os_set_fd_block(*fd_out, 0);
39 printk("start_io_thread - failed to set nonblocking I/O.\n");
43 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM, NULL);
46 printk("start_io_thread - clone failed : errno = %d\n", errno);
53 os_close_file(fds[0]);
54 os_close_file(fds[1]);