--- IO-AIO/AIO.xs 2005/08/23 01:16:50 1.35 +++ IO-AIO/AIO.xs 2005/08/23 01:18:04 1.36 @@ -362,10 +362,6 @@ atfork_parent (); } -/* currently noops */ -#define LOCK_FD(fd) do { } while (0) -#define UNLOCK_FD(fd) do { } while (0) - /*****************************************************************************/ /* work around various missing functions */ @@ -386,14 +382,12 @@ ssize_t res; off_t ooffset; - LOCK_FD (fd); - pthread_mutex_lock (&iolock); /* replace by LOCK_FD and private buffer */ + pthread_mutex_lock (&iolock); ooffset = lseek (fd, 0, SEEK_CUR); lseek (fd, offset, SEEK_SET); res = read (fd, buf, count); lseek (fd, ooffset, SEEK_SET); pthread_mutex_unlock (&iolock); - UNLOCK_FD (d); return res; } @@ -404,14 +398,12 @@ ssize_t res; off_t ooffset; - LOCK_FD (fd); - pthread_mutex_lock (&iolock); /* replace by LOCK_FD and private buffer */ + pthread_mutex_lock (&iolock); ooffset = lseek (fd, 0, SEEK_CUR); lseek (fd, offset, SEEK_SET); res = write (fd, buf, count); lseek (fd, offset, SEEK_SET); pthread_mutex_unlock (&iolock); - UNLOCK_FD (d); return res; } @@ -451,8 +443,6 @@ if (!count) return 0; - LOCK_FD (ofd); - #if HAVE_SENDFILE # if __linux res = sendfile (ofd, ifd, &offset, count); @@ -539,8 +529,6 @@ } } - UNLOCK_FD (ofd); - return res; }