Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47485
b: refs/heads/master
c: 9683da9
h: refs/heads/master
i:
  47483: 6f92305
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Feb 11, 2007
1 parent dd52f7f commit 11a5ca2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c59e2f593d0c00c78ec48146de6eaf52a342dd5
refs/heads/master: 9683da91e2db323ee728041576e29ad7fa9547b9
16 changes: 9 additions & 7 deletions trunk/arch/um/os-Linux/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ struct aio_thread_req {
struct aio_context *aio;
};

static int aio_req_fd_r = -1;
static int aio_req_fd_w = -1;

#if defined(HAVE_AIO_ABI)
#include <linux/aio_abi.h>

Expand Down Expand Up @@ -111,6 +108,7 @@ static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf,
return err;
}

/* Initialized in an initcall and unchanged thereafter */
static aio_context_t ctx = 0;

static int aio_thread(void *arg)
Expand All @@ -137,7 +135,7 @@ static int aio_thread(void *arg)
err = os_write_file(reply_fd, &reply, sizeof(reply));
if(err != sizeof(reply))
printk("aio_thread - write failed, fd = %d, "
"err = %d\n", aio_req_fd_r, -err);
"err = %d\n", reply_fd, -err);
}
}
return 0;
Expand Down Expand Up @@ -182,6 +180,11 @@ static int do_not_aio(struct aio_thread_req *req)
return err;
}

/* These are initialized in initcalls and not changed */
static int aio_req_fd_r = -1;
static int aio_req_fd_w = -1;
static int aio_pid = -1;

static int not_aio_thread(void *arg)
{
struct aio_thread_req req;
Expand All @@ -208,14 +211,12 @@ static int not_aio_thread(void *arg)
err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply));
if(err != sizeof(reply))
printk("not_aio_thread - write failed, fd = %d, "
"err = %d\n", aio_req_fd_r, -err);
"err = %d\n", req.aio->reply_fd, -err);
}

return 0;
}

static int aio_pid = -1;

static int init_aio_24(void)
{
unsigned long stack;
Expand Down Expand Up @@ -308,6 +309,7 @@ static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
}
#endif

/* Initialized in an initcall and unchanged thereafter */
static int aio_24 = DEFAULT_24_AIO;

static int __init set_aio_24(char *name, int *add)
Expand Down

0 comments on commit 11a5ca2

Please sign in to comment.