[Vm-dev] Re: nanoseconds problem in cocoa cog
Esteban Lorenzano
estebanlm at gmail.com
Mon Apr 11 23:11:59 UTC 2011
mmm... no, it looks like now it is hanging in aioPoll :(
I'm testing with a squeak 4.2 and the problem is evident and automatic... you can see the problem, if you want :)
cheers,
Esteban
El 11/04/2011, a las 6:00p.m., Esteban Lorenzano escribió:
> Hi,
> I'm experimenting some "random hangs" with my latest builds of cocoa cog (any jit version, I don't know jet if stack too)
> The application was hanging (but not crashing) each X random time and with no information, even running with gdb. After a while testing, I found that the problem was gere:
>
> /* sleep for microSeconds or until i/o becomes possible, avoiding
> sleeping in select() if timeout too small */
>
> int aioSleepForUsecs(int microSeconds)
> {
> #if defined(HAVE_NANOSLEEP)
> if (microSeconds < (1000000/60)) /* < 1 timeslice? */
> {
> if (!aioPoll(0))
> {
> struct timespec rqtp= { 0, microSeconds * 1000 };
> struct timespec rmtp;
> nanosleep(&rqtp, &rmtp);
> microSeconds= 0; /* poll but don't block */
> }
> }
> #endif
> return aioPoll(microSeconds);
> }
>
> and more precisely when calling nanosleep
> for now, I disabled HAVE_NANOSLEEP definition, and I'm testing (right now, no hangs), but I don't know how this should work.
>
> Someone knows?
>
> Cheers,
> Esteban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110411/c1764858/attachment.htm
More information about the Vm-dev
mailing list