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

Comparing libeio/eio.c (file contents):
Revision 1.54 by root, Tue Feb 23 14:32:45 2010 UTC vs.
Revision 1.55 by root, Wed Mar 31 00:46:18 2010 UTC

222static volatile unsigned int nreqs; /* reqlock */ 222static volatile unsigned int nreqs; /* reqlock */
223static volatile unsigned int nready; /* reqlock */ 223static volatile unsigned int nready; /* reqlock */
224static volatile unsigned int npending; /* reqlock */ 224static volatile unsigned int npending; /* reqlock */
225static volatile unsigned int max_idle = 4; 225static volatile unsigned int max_idle = 4;
226 226
227static mutex_t wrklock = X_MUTEX_INIT; 227static xmutex_t wrklock = X_MUTEX_INIT;
228static mutex_t reslock = X_MUTEX_INIT; 228static xmutex_t reslock = X_MUTEX_INIT;
229static mutex_t reqlock = X_MUTEX_INIT; 229static xmutex_t reqlock = X_MUTEX_INIT;
230static cond_t reqwait = X_COND_INIT; 230static xcond_t reqwait = X_COND_INIT;
231 231
232#if !HAVE_PREADWRITE 232#if !HAVE_PREADWRITE
233/* 233/*
234 * make our pread/pwrite emulation safe against themselves, but not against 234 * make our pread/pwrite emulation safe against themselves, but not against
235 * normal read/write by using a mutex. slows down execution a lot, 235 * normal read/write by using a mutex. slows down execution a lot,
236 * but that's your problem, not mine. 236 * but that's your problem, not mine.
237 */ 237 */
238static mutex_t preadwritelock = X_MUTEX_INIT; 238static xmutex_t preadwritelock = X_MUTEX_INIT;
239#endif 239#endif
240 240
241typedef struct etp_worker 241typedef struct etp_worker
242{ 242{
243 /* locked by wrklock */ 243 /* locked by wrklock */
244 struct etp_worker *prev, *next; 244 struct etp_worker *prev, *next;
245 245
246 thread_t tid; 246 xthread_t tid;
247 247
248 /* locked by reslock, reqlock or wrklock */ 248 /* locked by reslock, reqlock or wrklock */
249 ETP_REQ *req; /* currently processed request */ 249 ETP_REQ *req; /* currently processed request */
250 250
251 ETP_WORKER_COMMON 251 ETP_WORKER_COMMON

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines