sem_timedwait()
Stefan Farfeleder
stefan at fafoe.narf.at
Tue Feb 3 00:26:55 PST 2004
On Tue, Feb 03, 2004 at 01:14:22AM -0500, Daniel Eischen wrote:
> We need a prototype for sem_timedwait(). Here's a patch, but it doesn't
> seem to be consistent WRT __restrict. Does someone want to take a look
> at the POSIX specs (www.opengroup.org) and see if this is correct?
>
> Index: semaphore.h
> ===================================================================
> RCS file: /opt/FreeBSD/cvs/src/sys/posix4/semaphore.h,v
> retrieving revision 1.9
> diff -u -r1.9 semaphore.h
> --- semaphore.h 4 Oct 2002 21:31:33 -0000 1.9
> +++ semaphore.h 3 Feb 2004 00:40:12 -0000
> @@ -54,6 +54,7 @@
> int sem_init(sem_t *, int, unsigned int);
> sem_t *sem_open(const char *, int, ...);
> int sem_post(sem_t *);
> +int sem_timedwait(sem_t * __restrict, struct timespec * __restrict);
According to SUSv3 the second parameter's type should be
'const struct timespec * restrict'. restrict-wise it's correct.
Cheers,
Stefan
More information about the freebsd-standards
mailing list