ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.xs
(Generate patch)

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.40 by root, Sat Jun 24 16:27:02 2006 UTC vs.
Revision 1.42 by root, Fri Jul 21 07:35:31 2006 UTC

8#include "autoconf/config.h" 8#include "autoconf/config.h"
9 9
10#include <pthread.h> 10#include <pthread.h>
11 11
12#include <stddef.h> 12#include <stddef.h>
13#include <errno.h>
13#include <sys/types.h> 14#include <sys/types.h>
14#include <sys/stat.h> 15#include <sys/stat.h>
15#include <limits.h> 16#include <limits.h>
16#include <unistd.h> 17#include <unistd.h>
17#include <fcntl.h> 18#include <fcntl.h>
782 783
783PROTOTYPES: ENABLE 784PROTOTYPES: ENABLE
784 785
785BOOT: 786BOOT:
786{ 787{
788 HV *stash = gv_stashpv ("IO::AIO", 1);
789 newCONSTSUB (stash, "EXDEV", newSViv (EXDEV));
790 newCONSTSUB (stash, "O_RDONLY", newSViv (O_RDONLY));
791 newCONSTSUB (stash, "O_WRONLY", newSViv (O_WRONLY));
792
787 create_pipe (); 793 create_pipe ();
788 pthread_atfork (atfork_prepare, atfork_parent, atfork_child); 794 pthread_atfork (atfork_prepare, atfork_parent, atfork_child);
789} 795}
790 796
791void 797void
1026 req->dataptr = SvPVbyte_nolen (req->data); 1032 req->dataptr = SvPVbyte_nolen (req->data);
1027 1033
1028 send_req (req); 1034 send_req (req);
1029} 1035}
1030 1036
1037#if 0
1038
1039# undocumented, because it does not cancel active requests
1040void
1041cancel_most_requests ()
1042 PROTOTYPE:
1043 CODE:
1044{
1045 aio_req *req;
1046
1047 pthread_mutex_lock (&reqlock);
1048 for (req = reqs; req; req = req->next)
1049 req->flags |= 1;
1050 pthread_mutex_unlock (&reqlock);
1051
1052 pthread_mutex_lock (&reslock);
1053 for (req = ress; req; req = req->next)
1054 req->flags |= 1;
1055 pthread_mutex_unlock (&reslock);
1056}
1057
1058#endif
1059
1031void 1060void
1032flush () 1061flush ()
1033 PROTOTYPE: 1062 PROTOTYPE:
1034 CODE: 1063 CODE:
1035 while (nreqs) 1064 while (nreqs)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines