This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linux nanosleep investigation.


[ I just noticed a silly bug in my patch (I am returning the
  elapsed time not the remaining time!). sorry, I'll post a new one
  ASAP). ]

On Wed, 16 Feb 2000, Kevin Hendricks wrote:

>The real issue here is that if nanosleep is constantly being interrupted
>by numerous signals almost immediately after it gets entered and you add
>that one extra jiffee in rounding up, could the remaining time that is
>returned theoretically be larger than the initial time requested or show
>no elapsed time at all?

I can handle this correctly I think. That was the object of my patch.

>Kaz, given your arguments, we will have to simply keep track of time using
>gettimeofday in pthread_cond_timedwait and that is fine since it is passed an
>absolute timeout anyway, this is not an issue.

You won't need to use gettimeofday, but you'll only need to look at the
second argument of nanosleep. That's the whole point of my patch.

Andrea


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]