Permalink
Browse files

Remove configuration probe for asynchronous input/output per architec…

…t's instruction in RT 57920. Remove associated test file and reference to auto::aio in list of configuration steps, dummy files used in testing, etc.

git-svn-id: https://svn.parrot.org/parrot/trunk@34009 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 244b6c5 commit 570f6d4747ac8e668be484b1a8c3894669d5def0 @jkeenan jkeenan committed Dec 17, 2008
View
@@ -168,7 +168,7 @@ =head2 General Options
=item C<--ask>
-This turns on the user prompts during configuraion. Available only in
+This turns on the user prompts during configuration. Available only in
Command-Line interface. Not available in Configuration-File interface.
=item C<--test>
@@ -606,7 +606,6 @@ =head2 Example
auto::signal
auto::socklen_t
auto::env
- auto::aio
auto::gmp
auto::readline
auto::gdbm
View
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Dec 16 22:45:43 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Dec 17 03:21:14 2008 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -235,8 +235,6 @@ compilers/tge/TGE/Parser.pg []
compilers/tge/TGE/Rule.pir []
compilers/tge/TGE/Tree.pir []
compilers/tge/tgc.pir []
-config/auto/aio.pm []
-config/auto/aio/aio.in []
config/auto/alignptrs.pm []
config/auto/alignptrs/test_c.in []
config/auto/arch.pm []
@@ -3609,7 +3607,6 @@ t/src/compiler.t []
t/src/exit.t []
t/src/extend.t []
t/src/warnings.t []
-t/steps/auto_aio-01.t []
t/steps/auto_alignptrs-01.t []
t/steps/auto_alignptrs-02.t []
t/steps/auto_arch-01.t []
View
@@ -1,115 +0,0 @@
-# Copyright (C) 2001-2003, The Perl Foundation.
-# $Id$
-
-=head1 NAME
-
-config/auto/aio.pm - Test for AI/O
-
-=head1 DESCRIPTION
-
-Determines whether the platform supports asynchronous input/output.
-
-From the documentation to Marc Lehmann's CPAN module IO::AIO
-(L<http://search.cpan.org/dist/IO-AIO/AIO.pm>):
-
-I<"Asynchronous means that operations that can normally block your program
-(e.g. reading from disk) will be done asynchronously: the operation will
-still block, but you can do something else in the meantime. This is
-extremely useful for programs that need to stay interactive even when
-doing heavy I/O (GUI programs, high performance network servers etc.),
-but can also be used to easily do operations in parallel that are
-normally done sequentially ....">
-
-=cut
-
-package auto::aio;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils ':auto';
-
-
-sub _init {
- my $self = shift;
- my %data;
- $data{description} = q{Does your platform support AIO};
- $data{result} = q{};
- return \%data;
-}
-
-sub runstep {
- my ( $self, $conf ) = ( shift, shift );
-
- my $verbose = $conf->options->get('verbose');
- my $libs = $conf->data->get('libs');
-
- my $errormsg = _first_probe_for_aio($conf, $verbose);
- if ($errormsg) {
- # Linux, at least, needs to add -lrt to $libs.
- print " (Trying again with -lrt) " if $verbose;
- $conf->data->add( ' ', libs => '-lrt' );
- $errormsg = _first_probe_for_aio($conf, $verbose);
- }
-
- if ( ! $errormsg ) {
- my $test = $conf->cc_run();
-
- # if the test is failing with sigaction err
- # we should repeat it with a different signal number
- # This is currently not implemented.
- if (
- $test =~ /INFO=42\n
- ok/x
- )
- {
- print " (yes) " if $verbose;
- $self->set_result('yes');
-
- $conf->data->set(
- aio => 'define',
- HAS_AIO => 1,
- );
- }
- else {
- $self->_handle_error_case($conf, $libs, $verbose);
- }
- }
- else {
- $self->_handle_error_case($conf, $libs, $verbose);
- }
-
- return 1;
-}
-
-sub _first_probe_for_aio {
- my $conf = shift;
- my $verbose = shift;
- my $errormsg;
- $conf->cc_gen('config/auto/aio/aio.in');
- eval { $conf->cc_build(); };
- $errormsg = 1 if $@;
- return $errormsg;
-}
-
-sub _handle_error_case {
- my ($self, $conf, $libs, $verbose) = @_;
- $conf->data->set(
- aio => undef,
- HAS_AIO => 0,
- );
- $conf->data->set( libs => $libs ); # Restore old values
- print " (no) " if $verbose;
- $self->set_result('no');
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
View
@@ -1,69 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <aio.h>
-#include <signal.h>
-
-static void
-die(const char *s)
-{
- fprintf(stderr, "%s\n", s);
- exit(1);
-}
-
-static int my_sig, retval;
-
-static volatile sig_atomic_t flag;
-
-static void
-sighandler(const int s, siginfo_t *i, void *x)
-{
- if (s == my_sig) {
- flag = s;
- retval = *(int*)i->si_value.sival_ptr;
- }
-}
-
-int
-main(int argc, char *argv[])
-{
- struct aiocb a;
- struct sigaction sa;
- int fd;
- int i = 42;
- int cnt = 4;
-
- my_sig = SIGUSR1;
-
- fd = open("MANIFEST", O_RDONLY);
- if (fd < 0)
- die("can't open MANIFEST");
-
- a.aio_fildes = fd;
- a.aio_offset = 0;
- a.aio_reqprio = 0;
- a.aio_buf = malloc(100);
- a.aio_nbytes = 100;
- a.aio_sigevent.sigev_notify = SIGEV_SIGNAL;
- a.aio_sigevent.sigev_signo = my_sig;
- a.aio_sigevent.sigev_value.sival_ptr = &i;
- sa.sa_sigaction = sighandler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART|SA_SIGINFO;
- if (sigaction(my_sig, &sa, NULL) < 0)
- die("sigaction err");
- if (aio_read(&a) < 0)
- die("aio_read err");
- while (--cnt && !flag) {
- sleep(1);
- }
- if (flag != my_sig)
- die("wrong signal");
- close(fd);
- printf("INFO=%d\n", retval);
- puts("ok");
- return 0;
-}
@@ -51,7 +51,6 @@ my @steps = qw(
auto::signal
auto::socklen_t
auto::env
- auto::aio
auto::gmp
auto::readline
auto::gdbm
@@ -47,7 +47,6 @@ auto::memalign
auto::signal
auto::socklen_t
auto::env
-auto::aio
auto::gmp
auto::readline
auto::gdbm
@@ -57,7 +57,6 @@ auto::memalign
auto::signal
auto::socklen_t
auto::env
-auto::aio
auto::gmp
auto::readline
auto::gdbm
@@ -58,7 +58,6 @@ auto::memalign
auto::signal
auto::socklen_t
auto::env
-auto::aio
auto::gmp
auto::readline
auto::gdbm
@@ -49,7 +49,6 @@ auto::memalign
auto::signal
auto::socklen_t
auto::env
-auto::aio
auto::gmp
auto::readline
auto::gdbm
@@ -51,7 +51,6 @@ auto::memalign
auto::signal
auto::socklen_t
auto::env
-auto::aio
auto::gmp
auto::readline
auto::gdbm
Oops, something went wrong.

0 comments on commit 570f6d4

Please sign in to comment.