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: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost, 
        gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/38602: sigtimedwait modifies parameter marked 'restrict'
Date: Wed, 7 May 2008 09:08:13 -0400

 On May 7,  9:20am, ad%netbsd.org@localhost (ad%netbsd.org@localhost) wrote:
 -- Subject: kern/38602: sigtimedwait modifies parameter marked 'restrict'
 
 | >Number:         38602
 | >Category:       kern
 | >Synopsis:       sigtimedwait modifies parameter marked 'restrict'
 | >Confidential:   no
 | >Severity:       non-critical
 | >Priority:       medium
 | >Responsible:    kern-bug-people
 | >State:          open
 | >Class:          sw-bug
 | >Submitter-Id:   net
 | >Arrival-Date:   Wed May 07 09:20:00 +0000 2008
 | >Originator:     Andrew Doran
 | >Release:        4.99.62
 | >Organization:
 | The NetBSD Project
 | >Environment:
 | n/a
 | >Description:
 | sys_sigtimedwait() takes an interval encoded as a timespec. In order
 | to handle ERESTART and preserve the correct timeout, it copies back
 | the timeout parameter to userspace after subtracting the time spent
 | in the kernel waiting for a signal to arrive.
 | 
 | The timeout parameter to sigtimedwait() is marked with 'restrict',
 | meaning that the system call shouldn't change it. Modifying it could
 | confuse applications that expect it not to be modified, or could break
 | assumptions made by the compiler.
 
 The restrict qualifier when applied to a data pointer it indicates that
 during the scope of that pointer declaration, all data accessed through
 it will be accessed only through that pointer but not through any other
 pointer. The problem is that the pointer is also marked const. Is that
 what you mean?
 
 christos
 


Home | Main Index | Thread Index | Old Index