ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.c
(Generate patch)

Comparing libeio/eio.c (file contents):
Revision 1.21 by root, Sat Jun 21 00:13:13 2008 UTC vs.
Revision 1.22 by root, Fri Jul 11 10:54:50 2008 UTC

177static mutex_t wrklock = X_MUTEX_INIT; 177static mutex_t wrklock = X_MUTEX_INIT;
178static mutex_t reslock = X_MUTEX_INIT; 178static mutex_t reslock = X_MUTEX_INIT;
179static mutex_t reqlock = X_MUTEX_INIT; 179static mutex_t reqlock = X_MUTEX_INIT;
180static cond_t reqwait = X_COND_INIT; 180static cond_t reqwait = X_COND_INIT;
181 181
182#if !HAVE_PREADWRITE
183/*
184 * make our pread/pwrite emulation safe against themselves, but not against
185 * normal read/write by using a mutex. slows down execution a lot,
186 * but that's your problem, not mine.
187 */
188static mutex_t preadwritelock = X_MUTEX_INIT;
189#endif
190
182typedef struct etp_worker 191typedef struct etp_worker
183{ 192{
184 /* locked by wrklock */ 193 /* locked by wrklock */
185 struct etp_worker *prev, *next; 194 struct etp_worker *prev, *next;
186 195
699/* work around various missing functions */ 708/* work around various missing functions */
700 709
701#if !HAVE_PREADWRITE 710#if !HAVE_PREADWRITE
702# define pread eio__pread 711# define pread eio__pread
703# define pwrite eio__pwrite 712# define pwrite eio__pwrite
704
705/*
706 * make our pread/pwrite safe against themselves, but not against
707 * normal read/write by using a mutex. slows down execution a lot,
708 * but that's your problem, not mine.
709 */
710static mutex_t preadwritelock = X_MUTEX_INIT;
711 713
712static ssize_t 714static ssize_t
713eio__pread (int fd, void *buf, size_t count, off_t offset) 715eio__pread (int fd, void *buf, size_t count, off_t offset)
714{ 716{
715 ssize_t res; 717 ssize_t res;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines