NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38602: sigtimedwait modifies parameter marked 'restrict'



The following reply was made to PR kern/38602; it has been noted by GNATS.

From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: netbsd-bugs%NetBSD.org@localhost
Subject: Re: kern/38602: sigtimedwait modifies parameter marked 'restrict'
Date: Wed, 7 May 2008 13:03:11 +0200

 On Wed, 07 May 2008, ad%NetBSD.org@localhost wrote:
 > The timeout parameter to sigtimedwait() is marked with 'restrict',
 > meaning that the system call shouldn't change it.
 
 I don't think that's what "restrict" means.
 
 The formal definition of "restrict" is in section 6.7.3.1 of the C99
 standard, and is difficult to understand, but in this context it means
 something roughly similar to "the function may assume that this pointer
 argument doesn't point to the same memory as any other object that the
 function will use, and the caller is responsible for guaranteeing that
 this assumption is valid".
 
 --apb (Alan Barrett)
 


Home | Main Index | Thread Index | Old Index