diff options
-rw-r--r-- | eio.c | 16 | ||||
-rw-r--r-- | eio.pod | 2 |
2 files changed, 10 insertions, 8 deletions
@@ -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) { @@ -238,7 +238,7 @@ C<eio_poll>). 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<IO::AIO> perl module, which does +If you need to know how, check the C<IO::AIO> perl module, which does exactly that. |