This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_cond_timedwait() and absolute time?


Carsten Andersen <Carsten.Andersen@csr.com> writes:

> The pthread_cond_timedwait() function's 3rd parameter is a timespec
> structure containing absolute time. The clock_gettime() function does not
> support TIMER_ABSTIME. So how do I get hold of the absolute time that the
> pthread_cond_timedwait() function wants? I've tried to use the
> CLOCK_REALTIME id instead (and adding my delta time), but that doesn't work
> properly when used in the pthread_cond_timedwait() function?
> 

Looking at the code of both clock_gettime() and
pthread_cond_timedwait(), I cannot see anything obviously wrong with
either of them. In what way does pthread_cond_timedwait() not work
properly?

-- 
Nick Garnett - eCos Kernel Architect


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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