From 2593e3d47d7cfef64910fef19d29428fc13c2c92 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Jul 2008 10:54:50 +0000 Subject: *** empty log message *** --- eio.c | 16 +++++++++------- eio.pod | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/eio.c b/eio.c index ed73af2..725de8e 100644 --- a/eio.c +++ b/eio.c @@ -179,6 +179,15 @@ static mutex_t reslock = X_MUTEX_INIT; static mutex_t reqlock = X_MUTEX_INIT; static cond_t reqwait = X_COND_INIT; +#if !HAVE_PREADWRITE +/* + * make our pread/pwrite emulation safe against themselves, but not against + * normal read/write by using a mutex. slows down execution a lot, + * but that's your problem, not mine. + */ +static mutex_t preadwritelock = X_MUTEX_INIT; +#endif + typedef struct etp_worker { /* locked by wrklock */ @@ -702,13 +711,6 @@ int eio_poll (void) # define pread eio__pread # define pwrite eio__pwrite -/* - * make our pread/pwrite safe against themselves, but not against - * normal read/write by using a mutex. slows down execution a lot, - * but that's your problem, not mine. - */ -static mutex_t preadwritelock = X_MUTEX_INIT; - static ssize_t eio__pread (int fd, void *buf, size_t count, off_t offset) { diff --git a/eio.pod b/eio.pod index e21df31..3dd2466 100644 --- a/eio.pod +++ b/eio.pod @@ -238,7 +238,7 @@ C). Libeio can be embedded directly into programs. This functionality is not documented and not (yet) officially supported. -If you ened to know how, cehck the C perl module, which does +If you need to know how, check the C perl module, which does exactly that. -- cgit v1.2.3