semaphore/timespec question

Craig Rodrigues rodrigc at crodrigues.org
Tue Feb 3 08:29:13 PST 2004


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?  

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc at crodrigues.org


More information about the freebsd-standards mailing list