Date: Tue, 12 May 2009 13:02:49 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Jeff Roberson <jroberson@jroberson.net> Cc: arch@freebsd.org Subject: Re: lockless file descriptor lookup Message-ID: <86bppy60ti.fsf@ds4.des.no> In-Reply-To: <alpine.BSF.2.00.0905111720280.981@desktop> (Jeff Roberson's message of "Mon, 11 May 2009 17:32:17 -1000 (HST)") References: <alpine.BSF.2.00.0905111720280.981@desktop>
next in thread | previous in thread | raw e-mail | index | archive | help
Jeff Roberson <jroberson@jroberson.net> writes: > I'd also appreciate it if someone could look at my volatile cast and > make sure I'm actually forcing the compiler to refresh the fd_ofiles > array here: > > + if (fp =3D=3D ((struct file *volatile*)fdp->fd_ofiles)[fd]) The problem is that since it is not declared as volatile, some other piece of code may have modified it but not yet flushed it to RAM. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86bppy60ti.fsf>