On Sun, Mar 06, 2011 at 02:58:51PM +0100, Pascal Stumpf wrote:
> > FWIW, amd64 has the same strangeness, but here the timeout parameter
> > is smaller than on mips64el, so it passes the test case. ktrace/kdump
> > examples on amd64:
> > 
> >       7989 perl6    0.000004 CALL  poll(0x202a42800,0x1,0x14ef)
> >       7989 perl6    5.361508 RET   poll 0
> > 
> >      13736 perl6    0.000004 CALL  poll(0x210134400,0x1,0x15a4)
> >      13736 perl6    5.544580 RET   poll 0
[...]
> The implementation of pir::sleep seems to be dependent on whether parrot
> is threaded or not. (Look in src/scheduler.c, Parrot_cx_schedule_sleep()).
> Is that the case on macppc and mips64el? (Parrot_sleep() just calls
> sleep(3) on OpenBSD, so it probably is ...). The other method
> effectively calls pthread_cond_timedwait(). If there is indeed a bug in
> that function (still hard to imagine), we could work around it by
> building parrot without threads on those platforms.

s/those/all/

As i wrote, it also affects amd64, but the test suite doesn't show
it, because it's very sloppy (it sleeps for three seconds but is
happy if the actualy time difference between after and before the
sleep is betwwen 2 and 10 seconds).

> Can you (or Landry)
> try if that fixes the rakudo test (Configure.pl --without-threads)?

This definitely fixes the test (t/S29-context/sleep.t) on mips64el,
and also the three-line script I mentioned:

        print "Sleeping for 3s\n";
        my $s = sleep 3;
        print "Result: $s\n";

Ciao,
        Kili

Reply via email to