summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eio.c16
-rw-r--r--eio.pod2
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<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.