r56211 - in /branches/upstream/libcoro-perl/current: ./ Coro/ Coro/libcoro/ EV/ Event/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Apr 16 19:39:56 UTC 2010
Author: gregoa
Date: Fri Apr 16 19:39:49 2010
New Revision: 56211
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56211
Log:
[svn-upgrade] Integrating new upstream version, libcoro-perl (5.220)
Modified:
branches/upstream/libcoro-perl/current/Changes
branches/upstream/libcoro-perl/current/Coro.pm
branches/upstream/libcoro-perl/current/Coro/AIO.pm
branches/upstream/libcoro-perl/current/Coro/AnyEvent.pm
branches/upstream/libcoro-perl/current/Coro/BDB.pm
branches/upstream/libcoro-perl/current/Coro/Channel.pm
branches/upstream/libcoro-perl/current/Coro/Debug.pm
branches/upstream/libcoro-perl/current/Coro/Handle.pm
branches/upstream/libcoro-perl/current/Coro/LWP.pm
branches/upstream/libcoro-perl/current/Coro/MakeMaker.pm
branches/upstream/libcoro-perl/current/Coro/RWLock.pm
branches/upstream/libcoro-perl/current/Coro/Select.pm
branches/upstream/libcoro-perl/current/Coro/Semaphore.pm
branches/upstream/libcoro-perl/current/Coro/SemaphoreSet.pm
branches/upstream/libcoro-perl/current/Coro/Signal.pm
branches/upstream/libcoro-perl/current/Coro/Socket.pm
branches/upstream/libcoro-perl/current/Coro/Specific.pm
branches/upstream/libcoro-perl/current/Coro/State.pm
branches/upstream/libcoro-perl/current/Coro/Storable.pm
branches/upstream/libcoro-perl/current/Coro/Timer.pm
branches/upstream/libcoro-perl/current/Coro/Util.pm
branches/upstream/libcoro-perl/current/Coro/libcoro/coro.c
branches/upstream/libcoro-perl/current/Coro/schmorp.h
branches/upstream/libcoro-perl/current/EV/EV.pm
branches/upstream/libcoro-perl/current/Event/Event.pm
branches/upstream/libcoro-perl/current/META.json
branches/upstream/libcoro-perl/current/META.yml
Modified: branches/upstream/libcoro-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Changes?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Changes (original)
+++ branches/upstream/libcoro-perl/current/Changes Fri Apr 16 19:39:49 2010
@@ -1,12 +1,24 @@
Revision history for Perl extension Coro.
TODO: should explore PerlIO::coroaio (perl leaks like hell).
-TODO: maybe implement a default message channel, very much like Erlang's
- actor model (which is cool in a lot of important aspects (failures!),
- but very lacking in others (higher level ipc)).
TODO: unready_all
TODO: myhttpd header parsing
TODO: channel->maxsize(newsize)?
+TODO: http://www.microsoft.com/msj/archive/s2ce.aspx
+
+5.22 Wed Apr 14 03:55:35 CEST 2010
+ - correctly return udnef on errors in Coro::Handle::read/write
+ (testcase by Marc Wims).
+ - convert Coro::Util into a "perl compatibility wrapper" - the functions
+ are less useful now, but are drop-in replacements for existing
+ functions, listing better alternatives in the documentation. This also
+ fixes a bug in Coro::LWP which naively substituted Socket::inet_aton
+ with Coro::Util::inet_aton.
+ - do not override $Coro::idle unconditionally in Coro.pm, as other
+ modules could have provided their own idle coro already
+ (for exmaple, Coro::AnyEvent).
+ - fix Coro::Util::gethost* functions.
+ - Coro::Timer corretcly exports it's symbols (reported by Hideki Yamamura).
5.21 Wed Dec 16 07:19:51 CET 2009
- automatically load Coro::AnyEvent when AnyEvent and Coro are used
Modified: branches/upstream/libcoro-perl/current/Coro.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro.pm Fri Apr 16 19:39:49 2010
@@ -83,7 +83,7 @@
our $main; # main coro
our $current; # current coro
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait);
our %EXPORT_TAGS = (
@@ -140,7 +140,8 @@
=cut
-$idle = new Coro sub {
+# ||= because other modules could have provided their own by now
+$idle ||= new Coro sub {
require Coro::Debug;
die "FATAL: deadlock detected.\n"
. Coro::Debug::ps_listing ();
Modified: branches/upstream/libcoro-perl/current/Coro/AIO.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/AIO.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/AIO.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/AIO.pm Fri Apr 16 19:39:49 2010
@@ -68,7 +68,7 @@
use base Exporter::;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT = (@IO::AIO::EXPORT, qw(aio_wait));
our @EXPORT_OK = @IO::AIO::EXPORT_OK;
Modified: branches/upstream/libcoro-perl/current/Coro/AnyEvent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/AnyEvent.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/AnyEvent.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/AnyEvent.pm Fri Apr 16 19:39:49 2010
@@ -155,7 +155,7 @@
use Coro;
use AnyEvent ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
#############################################################################
# idle handler
@@ -260,6 +260,9 @@
events. Unlike C<poll>, it will only resume the thread once there are no
events to handle anymore, i.e. when the process is otherwise idle.
+This is good for background threads that shouldn't use CPU time when
+foreground jobs are ready to run.
+
=item Coro::AnyEvent::idle_upto $seconds
Like C<idle>, but with a maximum waiting time.
Modified: branches/upstream/libcoro-perl/current/Coro/BDB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/BDB.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/BDB.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/BDB.pm Fri Apr 16 19:39:49 2010
@@ -47,7 +47,7 @@
use base Exporter::;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our $WATCHER;
BDB::set_sync_prepare {
Modified: branches/upstream/libcoro-perl/current/Coro/Channel.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Channel.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Channel.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Channel.pm Fri Apr 16 19:39:49 2010
@@ -32,7 +32,7 @@
use Coro ();
use Coro::Semaphore ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
sub DATA (){ 0 }
sub SGET (){ 1 }
Modified: branches/upstream/libcoro-perl/current/Coro/Debug.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Debug.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Debug.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Debug.pm Fri Apr 16 19:39:49 2010
@@ -121,7 +121,7 @@
use Coro::AnyEvent ();
use Coro::Timer ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our %log;
our $SESLOGLEVEL = exists $ENV{PERL_CORO_DEFAULT_LOGLEVEL} ? $ENV{PERL_CORO_DEFAULT_LOGLEVEL} : -1;
Modified: branches/upstream/libcoro-perl/current/Coro/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Handle.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Handle.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Handle.pm Fri Apr 16 19:39:49 2010
@@ -45,7 +45,7 @@
use base 'Exporter';
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT = qw(unblock);
=item $fh = new_from_fh Coro::Handle $fhandle [, arg => value...]
@@ -434,7 +434,7 @@
sub WRITE {
my $len = defined $_[2] ? $_[2] : length $_[1];
my $ofs = $_[3];
- my $res = 0;
+ my $res;
while () {
my $r = syswrite ($_[0][0], $_[1], $len, $ofs);
@@ -449,13 +449,13 @@
last unless &writable;
}
- return $res;
+ $res
}
sub READ {
my $len = $_[2];
my $ofs = $_[3];
- my $res = 0;
+ my $res;
# first deplete the read buffer
if (length $_[0][3]) {
@@ -486,7 +486,7 @@
last if $_[0][8] || !&readable;
}
- return $res;
+ $res
}
sub READLINE {
Modified: branches/upstream/libcoro-perl/current/Coro/LWP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/LWP.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/LWP.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/LWP.pm Fri Apr 16 19:39:49 2010
@@ -94,7 +94,7 @@
use Net::FTP ();
use Net::NNTP ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
*Socket::inet_aton = \&Coro::Util::inet_aton;
Modified: branches/upstream/libcoro-perl/current/Coro/MakeMaker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/MakeMaker.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/MakeMaker.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/MakeMaker.pm Fri Apr 16 19:39:49 2010
@@ -7,7 +7,7 @@
our $installsitearch;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT_OK = qw(&coro_args $installsitearch);
my %opt;
Modified: branches/upstream/libcoro-perl/current/Coro/RWLock.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/RWLock.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/RWLock.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/RWLock.pm Fri Apr 16 19:39:49 2010
@@ -30,7 +30,7 @@
use Coro ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
=item $l = new Coro::RWLock;
Modified: branches/upstream/libcoro-perl/current/Coro/Select.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Select.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Select.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Select.pm Fri Apr 16 19:39:49 2010
@@ -67,7 +67,7 @@
use base Exporter::;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT_OK = "select";
sub import {
Modified: branches/upstream/libcoro-perl/current/Coro/Semaphore.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Semaphore.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Semaphore.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Semaphore.pm Fri Apr 16 19:39:49 2010
@@ -37,7 +37,7 @@
use Coro ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
=item new [inital count]
Modified: branches/upstream/libcoro-perl/current/Coro/SemaphoreSet.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/SemaphoreSet.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/SemaphoreSet.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/SemaphoreSet.pm Fri Apr 16 19:39:49 2010
@@ -32,7 +32,7 @@
use common::sense;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
use Coro::Semaphore ();
Modified: branches/upstream/libcoro-perl/current/Coro/Signal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Signal.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Signal.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Signal.pm Fri Apr 16 19:39:49 2010
@@ -35,7 +35,7 @@
use Coro::Semaphore ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
=item $sig = new Coro::Signal;
Modified: branches/upstream/libcoro-perl/current/Coro/Socket.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Socket.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Socket.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Socket.pm Fri Apr 16 19:39:49 2010
@@ -73,7 +73,7 @@
use base qw(Coro::Handle IO::Socket::INET);
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our (%_proto, %_port);
Modified: branches/upstream/libcoro-perl/current/Coro/Specific.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Specific.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Specific.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Specific.pm Fri Apr 16 19:39:49 2010
@@ -26,7 +26,7 @@
use common::sense;
-our $VERSION = 5.21;
+our $VERSION = 5.22;
=item new
Modified: branches/upstream/libcoro-perl/current/Coro/State.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/State.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/State.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/State.pm Fri Apr 16 19:39:49 2010
@@ -92,7 +92,7 @@
use XSLoader;
BEGIN {
- our $VERSION = 5.21;
+ our $VERSION = 5.22;
# must be done here because the xs part expects it to exist
# it might exist already because Coro::Specific created it.
Modified: branches/upstream/libcoro-perl/current/Coro/Storable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Storable.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Storable.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Storable.pm Fri Apr 16 19:39:49 2010
@@ -84,7 +84,7 @@
use Storable;
use base "Exporter";
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT = qw(thaw freeze nfreeze blocking_thaw blocking_freeze blocking_nfreeze);
our $GRANULARITY = 0.01;
Modified: branches/upstream/libcoro-perl/current/Coro/Timer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Timer.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Timer.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Timer.pm Fri Apr 16 19:39:49 2010
@@ -23,14 +23,14 @@
use common::sense;
use Carp ();
-use Exporter;
+use base Exporter::;
use AnyEvent ();
use Coro ();
use Coro::AnyEvent ();
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our @EXPORT_OK = qw(timeout sleep);
=item $flag = timeout $seconds;
Modified: branches/upstream/libcoro-perl/current/Coro/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/Util.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/Util.pm (original)
+++ branches/upstream/libcoro-perl/current/Coro/Util.pm Fri Apr 16 19:39:49 2010
@@ -10,6 +10,9 @@
This module implements various utility functions, mostly replacing perl
functions by non-blocking counterparts.
+
+Many of these functions exist for the sole purpose of emulating existing
+interfaces, no matter how bad or limited they are (e.g. no IPv6 support).
This module is an AnyEvent user. Refer to the L<AnyEvent>
documentation to see how to integrate it into your own programs.
@@ -38,7 +41,7 @@
our @EXPORT = qw(gethostbyname gethostbyaddr);
our @EXPORT_OK = qw(inet_aton fork_eval);
-our $VERSION = 5.21;
+our $VERSION = 5.22;
our $MAXPARALLEL = 16; # max. number of parallel jobs
@@ -77,28 +80,35 @@
=item $ipn = Coro::Util::inet_aton $hostname || $ip
-Works almost exactly like its AnyEvent::Socket counterpart, except that it
-does not block other coroutines and returns the results.
+Works almost exactly like its C<Socket::inet_aton> counterpart, except
+that it does not block other coroutines.
+
+Does not handle multihomed hosts or IPv6 - consider using
+C<AnyEvent::Socket::resolve_sockaddr> with the L<Coro> rouse functions
+instead.
=cut
sub inet_aton {
AnyEvent::Socket::inet_aton $_[0], Coro::rouse_cb;
- my @res = Coro::rouse_wait;
- wantarray ? @res : $res[0]
+ (grep length == 4, Coro::rouse_wait)[0]
}
=item gethostbyname, gethostbyaddr
-Work similarly to their perl counterparts, but do not block. Uses
-C<Anyevent::Util::inet_aton> internally.
+Work similarly to their Perl counterparts, but do not block. Uses
+C<AnyEvent::Util::inet_aton> internally.
+
+Does not handle multihomed hosts or IPv6 - consider using
+C<AnyEvent::Socket::resolve_sockaddr> or C<AnyEvent::DNS::reverse_lookup>
+with the L<Coro> rouse functions instead.
=cut
sub gethostbyname($) {
- my @res = inet_aton $_[0];
-
- ($_[0], $_[0], &Socket::AF_INET, 4, map +(format_ip $_), grep length == 4, @res)
+ AnyEvent::Socket::inet_aton $_[0], Coro::rouse_cb;
+
+ ($_[0], $_[0], &Socket::AF_INET, 4, map +(AnyEvent::Socket::format_address $_), grep length == 4, Coro::rouse_wait)
}
sub gethostbyaddr($$) {
@@ -124,6 +134,10 @@
This function might keep a pool of processes in some future version, as
fork can be rather slow in large processes.
+
+You should also look at C<AnyEvent::Util::fork_eval>, which is newer and
+more compatible to totally broken Perl implementations such as the one
+from ActiveState.
Example: execute some external program (convert image to rgba raw form)
and add a long computation (extract the alpha channel) in a separate
Modified: branches/upstream/libcoro-perl/current/Coro/libcoro/coro.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/libcoro/coro.c?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/libcoro/coro.c (original)
+++ branches/upstream/libcoro-perl/current/Coro/libcoro/coro.c Fri Apr 16 19:39:49 2010
@@ -117,6 +117,8 @@
".globl coro_transfer\n"
".type coro_transfer, @function\n"
"coro_transfer:\n"
+ /* windows, of course, gives a shit on the amd64 ABI and uses different registers */
+ /* http://blogs.msdn.com/freik/archive/2005/03/17/398200.aspx */
#if __amd64
#define NUM_SAVED 6
"\tpush %rbp\n"
@@ -125,8 +127,18 @@
"\tpush %r13\n"
"\tpush %r14\n"
"\tpush %r15\n"
+ #if CORO_WIN_TIB
+ "\tpush %gs:0x0\n"
+ "\tpush %gs:0x8\n"
+ "\tpush %gs:0xc\n"
+ #endif
"\tmov %rsp, (%rdi)\n"
"\tmov (%rsi), %rsp\n"
+ #if CORO_WIN_TIB
+ "\tpop %gs:0xc\n"
+ "\tpop %gs:0x8\n"
+ "\tpop %gs:0x0\n"
+ #endif
"\tpop %r15\n"
"\tpop %r14\n"
"\tpop %r13\n"
@@ -139,8 +151,18 @@
"\tpush %ebx\n"
"\tpush %esi\n"
"\tpush %edi\n"
+ #if CORO_WIN_TIB
+ "\tpush %fs:0\n"
+ "\tpush %fs:4\n"
+ "\tpush %fs:8\n"
+ #endif
"\tmov %esp, (%eax)\n"
"\tmov (%edx), %esp\n"
+ #if CORO_WIN_TIB
+ "\tpop %fs:8\n"
+ "\tpop %fs:4\n"
+ "\tpop %fs:0\n"
+ #endif
"\tpop %edi\n"
"\tpop %esi\n"
"\tpop %ebx\n"
@@ -225,9 +247,12 @@
# elif CORO_LOSER
coro_setjmp (ctx->env);
- #if __CYGWIN__
+ #if __CYGWIN__ && __i386
ctx->env[8] = (long) coro_init;
ctx->env[7] = (long) ((char *)sptr + ssize) - sizeof (long);
+ #elif __CYGWIN__ && __x86_64
+ ctx->env[7] = (long) coro_init;
+ ctx->env[6] = (long) ((char *)sptr + ssize) - sizeof (long);
#elif defined(__MINGW32__)
ctx->env[5] = (long) coro_init;
ctx->env[4] = (long) ((char *)sptr + ssize) - sizeof (long);
@@ -236,10 +261,10 @@
((_JUMP_BUFFER *)&ctx->env)->Esp = (long) STACK_ADJUST_PTR (sptr, ssize) - sizeof (long);
#elif defined(_M_AMD64)
((_JUMP_BUFFER *)&ctx->env)->Rip = (__int64) coro_init;
- ((_JUMP_BUFFER *)&ctx->env)->Rsp = (__int64) STACK_ADJUST_PTR (sptr, ssize) - sizeof (long);
+ ((_JUMP_BUFFER *)&ctx->env)->Rsp = (__int64) STACK_ADJUST_PTR (sptr, ssize) - sizeof (__int64);
#elif defined(_M_IA64)
((_JUMP_BUFFER *)&ctx->env)->StIIP = (__int64) coro_init;
- ((_JUMP_BUFFER *)&ctx->env)->IntSp = (__int64) STACK_ADJUST_PTR (sptr, ssize) - sizeof (long);
+ ((_JUMP_BUFFER *)&ctx->env)->IntSp = (__int64) STACK_ADJUST_PTR (sptr, ssize) - sizeof (__int64);
#else
#error "microsoft libc or architecture not supported"
#endif
@@ -274,6 +299,13 @@
ctx->sp = (void **)(ssize + (char *)sptr);
*--ctx->sp = (void *)abort; /* needed for alignment only */
*--ctx->sp = (void *)coro_init;
+
+ #if CORO_WIN_TIB
+ *--ctx->sp = 0; /* ExceptionList */
+ *--ctx->sp = (char *)sptr + ssize; /* StackBase */
+ *--ctx->sp = sptr; /* StackLimit */
+ #endif
+
ctx->sp -= NUM_SAVED;
# elif CORO_UCONTEXT
Modified: branches/upstream/libcoro-perl/current/Coro/schmorp.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Coro/schmorp.h?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Coro/schmorp.h (original)
+++ branches/upstream/libcoro-perl/current/Coro/schmorp.h Fri Apr 16 19:39:49 2010
@@ -446,8 +446,10 @@
if (dup2 (epn.fd [0], epp->fd [0]) < 0)
croak ("unable to dup over old event pipe"); /* should not croak */
- if (epp->fd [1] != epp->fd [0])
- close (epn.fd [0]);
+ close (epn.fd [0]);
+
+ if (epn.fd [0] == epn.fd [1])
+ epn.fd [1] = epp->fd [0];
epn.fd [0] = epp->fd [0];
}
Modified: branches/upstream/libcoro-perl/current/EV/EV.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/EV/EV.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/EV/EV.pm (original)
+++ branches/upstream/libcoro-perl/current/EV/EV.pm Fri Apr 16 19:39:49 2010
@@ -56,7 +56,7 @@
use XSLoader;
BEGIN {
- our $VERSION = 5.21;
+ our $VERSION = 5.22;
local $^W = 0; # avoid redefine warning for Coro::ready;
XSLoader::load __PACKAGE__, $VERSION;
Modified: branches/upstream/libcoro-perl/current/Event/Event.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/Event/Event.pm?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/Event/Event.pm (original)
+++ branches/upstream/libcoro-perl/current/Event/Event.pm Fri Apr 16 19:39:49 2010
@@ -92,7 +92,7 @@
our @EXPORT = qw(loop unloop sweep);
BEGIN {
- our $VERSION = 5.21;
+ our $VERSION = 5.22;
local $^W = 0; # avoid redefine warning for Coro::ready;
XSLoader::load __PACKAGE__, $VERSION;
Modified: branches/upstream/libcoro-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/META.json?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/META.json (original)
+++ branches/upstream/libcoro-perl/current/META.json Fri Apr 16 19:39:49 2010
@@ -1,1 +1,1 @@
-{"no_index":{"directory":["t","inc"]},"meta-spec":{"version":1.4,"url":"http://module-build.sourceforge.net/META-spec-v1.4.html"},"generated_by":"ExtUtils::MakeMaker version 6.54","distribution_type":"module","version":"5.21","name":"Coro","author":[],"license":"unknown","build_requires":{"ExtUtils::MakeMaker":0},"requires":{"Scalar::Util":0,"AnyEvent":5,"Guard":0.5,"Storable":2.15,"Time::HiRes":0,"common::sense":0},"recommends":{"BDB":0,"AnyEvent::AIO":1,"Event":1.08,"EV":3,"IO::AIO":3.1,"AnyEvent::BDB":1},"abstract":null,"configure_requires":{"ExtUtils::MakeMaker":0}}
+{"no_index":{"directory":["t","inc"]},"meta-spec":{"version":1.4,"url":"http://module-build.sourceforge.net/META-spec-v1.4.html"},"generated_by":"ExtUtils::MakeMaker version 6.54","distribution_type":"module","version":"5.22","name":"Coro","author":[],"license":"unknown","build_requires":{"ExtUtils::MakeMaker":0},"requires":{"Scalar::Util":0,"AnyEvent":5,"Guard":0.5,"Storable":2.15,"Time::HiRes":0,"common::sense":0},"recommends":{"BDB":0,"AnyEvent::AIO":1,"Event":1.08,"EV":3,"IO::AIO":3.1,"AnyEvent::BDB":1},"abstract":null,"configure_requires":{"ExtUtils::MakeMaker":0}}
Modified: branches/upstream/libcoro-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcoro-perl/current/META.yml?rev=56211&op=diff
==============================================================================
--- branches/upstream/libcoro-perl/current/META.yml (original)
+++ branches/upstream/libcoro-perl/current/META.yml Fri Apr 16 19:39:49 2010
@@ -11,7 +11,7 @@
},
"generated_by" : "ExtUtils::MakeMaker version 6.54",
"distribution_type" : "module",
- "version" : "5.21",
+ "version" : "5.22",
"name" : "Coro",
"author" : [],
"license" : "unknown",
More information about the Pkg-perl-cvs-commits
mailing list