This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: pthread_cond_timedwait() and absolute time?
- From: Nick Garnett <nickg at calivar dot demon dot co dot uk>
- To: Carsten Andersen <Carsten dot Andersen at csr dot com>
- Cc: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Date: 20 Jun 2002 23:40:49 +0100
- Subject: Re: [ECOS] pthread_cond_timedwait() and absolute time?
- References: <AE087AD7160474448283E09975B1161A4BFB6C@exchange01.csr.com>
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