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

Comparing cvsroot/libeio/eio.c (file contents):
Revision 1.18 by root, Mon Jun 16 12:19:55 2008 UTC vs.
Revision 1.20 by root, Thu Jun 19 09:05:43 2008 UTC

371 371
372 pthread_once (&doinit, etp_once_init); 372 pthread_once (&doinit, etp_once_init);
373 373
374 want_poll_cb = want_poll; 374 want_poll_cb = want_poll;
375 done_poll_cb = done_poll; 375 done_poll_cb = done_poll;
376
377 return 0;
376} 378}
377 379
378X_THREAD_PROC (etp_proc); 380X_THREAD_PROC (etp_proc);
379 381
380static void etp_start_thread (void) 382static void etp_start_thread (void)
901 int memlen = 4096; 903 int memlen = 4096;
902 int memofs = 0; 904 int memofs = 0;
903 int res = 0; 905 int res = 0;
904 906
905 X_LOCK (wrklock); 907 X_LOCK (wrklock);
908 /* the corresponding closedir is in ETP_WORKER_CLEAR */
906 self->dirp = dirp = opendir (req->ptr1); 909 self->dirp = dirp = opendir (req->ptr1);
907 req->flags |= EIO_FLAG_PTR2_FREE; 910 req->flags |= EIO_FLAG_PTR2_FREE;
908 req->ptr2 = names = malloc (memlen); 911 req->ptr2 = names = malloc (memlen);
909 X_UNLOCK (wrklock); 912 X_UNLOCK (wrklock);
910 913
1039 1042
1040/*****************************************************************************/ 1043/*****************************************************************************/
1041 1044
1042int eio_init (void (*want_poll)(void), void (*done_poll)(void)) 1045int eio_init (void (*want_poll)(void), void (*done_poll)(void))
1043{ 1046{
1044 etp_init (want_poll, done_poll); 1047 return etp_init (want_poll, done_poll);
1045} 1048}
1046 1049
1047static void eio_api_destroy (eio_req *req) 1050static void eio_api_destroy (eio_req *req)
1048{ 1051{
1049 free (req); 1052 free (req);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines