tech-kern archive

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

Re: rfc: vmem(9) API/implementation changes



On Wed, Jul 27, 2011 at 05:58:53PM +0000, Eduardo Horvath wrote:
 > OTOH, how many times have you seen code like this:
 > 
 > foo(vmem_t *v) {
 >      void *p;
 > 
 >      vmem_alloc(v, 52, 0, (vmem_addr_t *)&p);
 > 
 > ....
 > 
 > 
 > which has implementation defined functionality.

Code like that usually violates the aliasing rules and is thereby
fully undefined, not merely implementation-defined.

Case in point: atomic_add_ptr...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index