3 %bcond_without tests # do not perform "make test"
7 Summary: Linux::AIO - Linux-specific AIO implemented using clone
8 Summary(pl.UTF-8): Linux::AIO - linuksowe AIO zaimplementowane przy użyciu clone
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 8b70ad6bce649c162bbd8733d4405972
17 URL: http://search.cpan.org/dist/Linux-AIO/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
20 ExclusiveArch: %{ix86} %{x8664} alpha sparc64
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 This module implements asynchronous I/O using the means available to
25 Linux - clone. It does not hook into the POSIX aio_* functions because
26 Linux does not yet support these in the kernel (and even if, it would
27 only allow aio_read and write, not open and stat).
29 Instead, in this module a number of (non-posix) threads are started
30 that execute your read/writes and signal their completion. You don't
31 need thread support in your libc or Perl, and the threads created by
32 this module will not be visible to the pthreads library.
34 NOTICE: the threads created by this module will automatically be
35 killed when the thread calling min_parallel exits. Make sure you only
36 ever call min_parallel from the same thread that loaded this module.
38 Although the module will work with threads, it is not reentrant, so
39 use appropriate locking yourself.
41 %description -l pl.UTF-8
42 Ten moduł implementuje asynchroniczne I/O przy użyciu środka
43 dostępnego pod Linuksem - clone. Nie odwołuje się do funkcji POSIX
44 aio_* ponieważ Linux jeszcze nie obsługuje ich w jądrze (a nawet
45 gdyby, to pozwoliłby tylko na aio_read i write, a nie open i stat).
47 Zamiast tego w tym module uruchamiane jest wiele (nie-posiksowych)
48 wątków wykonujących odczyty/zapisy i sygnalizujących ich zakończenie.
49 Nie jest wymagana obsługa wątków w libc czy Perlu, a tworzone wątki
50 nie są widoczne dla biblioteki pthreads.
52 UWAGA: wątki stworzone przez ten moduł będą automatycznie zabijane po
53 zakończeniu wątku wywołującego min_parallel. Trzeba upewnić się, że
54 wywołujemy min_parallel z tego samego wątku, który wczytał ten moduł.
56 Chociaż ten moduł będzie działał z wątkami, nie jest wielowejściowy
57 (reentrant), więc odpowiednie blokady trzeba oprogramować samemu.
60 %setup -q -n %{pdir}-%{pnam}-%{version}
63 %{__perl} Makefile.PL \
68 OPTIMIZE="%{rpmcflags}"
70 %{?with_tests:%{__make} test}
73 rm -rf $RPM_BUILD_ROOT
76 DESTDIR=$RPM_BUILD_ROOT
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %{perl_vendorarch}/Linux/*.pm
85 %dir %{perl_vendorarch}/auto/Linux/AIO
86 %attr(755,root,root) %{perl_vendorarch}/auto/Linux/AIO/AIO.so