lockless file descriptor lookup

Dag-Erling Smørgrav des at des.no
Tue May 12 11:02:51 UTC 2009


Jeff Roberson <jroberson at 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 == ((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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-arch mailing list