semaphore/timespec question

Daniel Eischen eischen at vigrid.com
Tue Feb 3 08:33:36 PST 2004


On Tue, 3 Feb 2004, Craig Rodrigues wrote:

> On Tue, Feb 03, 2004 at 11:11:09AM -0500, Daniel Eischen wrote:
> > <semaphore.h> (and also <_semaphore.h>) now need struct timespec to be
> > defined.  What's the preferred way to do this?  Add a "struct timespec;"
> > to <_semaphore.h> or <semaphore.h>?
> 
> 
> According to:
> http://www.opengroup.org/onlinepubs/007904975/functions/sem_timedwait.html
> 
> "The timespec data type is defined as a structure in the
>  <time.h> header."
> 
> It would seem to me that adding "struct timespec;" would
> be OK, but I defer to one of the standards gurus to interpret this.
> 
> The <_semaphore.h> header seems to only have stuff
> for the ksem_* functions.  Are you adding stuff in there
> which uses struct timespec?  

Yes, ksem_timedwait().

-- 
Dan Eischen



More information about the freebsd-standards mailing list