On Samstag 30 September 2006 20:04, Marko Mäkelä wrote:
> On Sat, Sep 30, 2006 at 05:32:06PM +0100, Laz wrote:
> > I usually let mine turn itself on and off with nvram-wakeup! I see
> > the problem when I leave it for a short while in the middle of something
> > and get distracted!
>
> Me too. Sometimes, I hit the Power button followed by some other button
> to suspend the playback and to prevent the system from powering off.
> Then, I'd hit the Power button to resume.
>
> > Hmmm...if you're right about this, how long should it take to overflow? The
> > only counter I can see is a 64-bit integer which looks like it's counting
> > in
> > useconds which would take a few million years to overflow, by my reckoning!
> > Maybe I'm looking in the wrong place and it's a 32-bit counter which would
> > take 1 h 12 min to overflow. Not sure it was taking that long but it's hard
> > to tell.
Negative values should not harm,as we would return immedeatly.
>
> I would have believed that one hang occurred after a 40-minute suspension.
> Could it perhaps be a signed counter, counting 1<<31 microseconds before
> overflow?
40 minute time frame is good. Had to wait a 2nd one, as I did not save my
inserted trace messages :-( .
Pause:
Oct 1 00:28:47 jarada jarada vdr: [32130] setting audio track to 1 (0)
Oct 1 00:28:47 jarada jarada vdr: [32133] [softdevice-audio]: xrun
Play:
Oct 1 01:11:37 jarada jarada vdr: [32133] [softdevice-audio]: xrun
And now we'll wait for about 27 minutes (without getting signalled?):
Pause:
-- 0 signalled :retcode -- : Invalid argument
Play:
-- Play --
-- Play --
-- bad timeout 1665974591 634cc13f --
/* --- cSigTimer --------------------------------------------------------------
*/
int cSigTimer::Sleep(int timeoutUS, int lowLimitUS)
{
got_signal=false;
if ( timeoutUS < lowLimitUS )
return GetRelTime();
if (timeoutUS > 1000000)
fprintf(stderr, " -- bad timeout %d %08x --\n", timeoutUS, timeoutUS);
struct timeval tv;
gettimeofday(&tv,NULL);
struct timespec timeout;
timeout.tv_nsec=(tv.tv_usec+timeoutUS-lowLimitUS);//*1000;
timeout.tv_sec=tv.tv_sec + timeout.tv_nsec / 1000000;
timeout.tv_nsec%=1000000;
timeout.tv_nsec*=1000;
pthread_mutex_lock(&mutex);
int retcode=0;
while ( retcode != ETIMEDOUT && !got_signal ) {
retcode = pthread_cond_timedwait(&cond, &mutex, &timeout);
if (retcode != ETIMEDOUT && retcode != EINTR)
{fprintf(stderr, " -- %d %s signalled :", retcode, (got_signal) ? "": "NOT ");
perror("retcode -- ");}
}
got_signal = false;
pthread_mutex_unlock(&mutex);
return GetRelTime();
}
--
Stefan Lucke
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel