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

Comparing libeio/eio.h (file contents):
Revision 1.28 by root, Fri Feb 11 00:53:24 2011 UTC vs.
Revision 1.32 by root, Fri Jun 10 12:35:18 2011 UTC

198 unsigned char flags; /* private */ 198 unsigned char flags; /* private */
199 signed char pri; /* the priority */ 199 signed char pri; /* the priority */
200 200
201 void *data; 201 void *data;
202 eio_cb finish; 202 eio_cb finish;
203 void (*destroy)(eio_req *req); /* called when requets no longer needed */ 203 void (*destroy)(eio_req *req); /* called when request no longer needed */
204 void (*feed)(eio_req *req); /* only used for group requests */ 204 void (*feed)(eio_req *req); /* only used for group requests */
205 205
206 EIO_REQ_MEMBERS 206 EIO_REQ_MEMBERS
207 207
208 eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */ 208 eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */
239 * maximum wanted number 239 * maximum wanted number
240 * or maximum idle number of threads */ 240 * or maximum idle number of threads */
241void eio_set_min_parallel (unsigned int nthreads); 241void eio_set_min_parallel (unsigned int nthreads);
242void eio_set_max_parallel (unsigned int nthreads); 242void eio_set_max_parallel (unsigned int nthreads);
243void eio_set_max_idle (unsigned int nthreads); 243void eio_set_max_idle (unsigned int nthreads);
244void eio_set_idle_timeout (unsigned int seconds);
244 245
245unsigned int eio_nreqs (void); /* number of requests in-flight */ 246unsigned int eio_nreqs (void); /* number of requests in-flight */
246unsigned int eio_nready (void); /* number of not-yet handled requests */ 247unsigned int eio_nready (void); /* number of not-yet handled requests */
247unsigned int eio_npending (void); /* numbe rof finished but unhandled requests */ 248unsigned int eio_npending (void); /* numbe rof finished but unhandled requests */
248unsigned int eio_nthreads (void); /* number of worker threads in use currently */ 249unsigned int eio_nthreads (void); /* number of worker threads in use currently */
249 250
250/*****************************************************************************/ 251/*****************************************************************************/
251/* convinience wrappers */ 252/* convenience wrappers */
252 253
253#ifndef EIO_NO_WRAPPERS 254#ifndef EIO_NO_WRAPPERS
254eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */ 255eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */
255eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */ 256eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */
256eio_req *eio_sync (int pri, eio_cb cb, void *data); 257eio_req *eio_sync (int pri, eio_cb cb, void *data);
288eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ 289eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
289eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data); 290eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data);
290eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 291eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
291eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 292eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
292eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 293eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
293eio_req *eio_custom (eio_cb execute, int pri, eio_cb cb, void *data); 294eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data);
294#endif 295#endif
295 296
296/*****************************************************************************/ 297/*****************************************************************************/
297/* groups */ 298/* groups */
298 299

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines