On Fri, 22 Oct 2004, [iso-8859-1] Dag-Erling Sm?rgrav wrote:
DS>Harti Brandt <harti@freebsd.org> writes:
DS>> You cannot prevent the compiler from makeing temporary copies.
DS>
DS>Yes, you can, using the volatile keyword.
That doesn't help you if the compiler needs to fetch the function pointer
into a register to call it. That would be allowed even if you declare the
pointer volatile. Something like
mov funcptr, r0
call @r0
If some other thread slips just between these two statements your call may
end up somewhere.
harti