ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-AIO/t/aio_test_common.pm
Revision: 1.1
Committed: Sun Jul 31 17:05:58 2005 UTC (18 years, 9 months ago) by root
Branch: MAIN
CVS Tags: rel-1_9, rel-1_8, HEAD
Log Message:
*** empty log message ***

File Contents

# Content
1 use Linux::AIO;
2
3 package aio_test_common;
4
5 use strict;
6 require Exporter;
7 use vars qw(@ISA @EXPORT);
8 use File::Temp ();
9
10 @ISA = qw(Exporter);
11 @EXPORT = qw(pcb tempdir);
12
13 sub tempdir {
14 return File::Temp::tempdir( CLEANUP => 1 );
15 }
16
17 sub pcb {
18 while (Linux::AIO::nreqs) {
19 my $rfd = ""; vec ($rfd, Linux::AIO::poll_fileno, 1) = 1; select $rfd, undef, undef, undef;
20 Linux::AIO::poll_cb;
21 }
22 }
23
24 1;
25