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

Re: spinlocks (was Re: [f-cpu] another DATE report)



On Mon, 18 Mar 2002, Michael Riepe wrote:

> On Mon, Mar 18, 2002 at 12:41:41PM +0100, Yann Guidon wrote:
> > hello,
> > 
> > Christophe wrote:
> > > > We could easily do this kind of operation in hardware, btw.
> > > Oh fine.
> > 
> > just a question : "how" ?
> 
> 	repeat
> 		pull the requested memory location into the cache
> 		make the executing CPU the owner of the cache line (SMP)

Ain't that exactly the problem? How do you become exclusive owner?

> 		read data and compare
> 		if (the line is still valid and owned by us)
> 			if (the result was true)
> 				write data
> 			end if
> 			return (result)
> 		end if
> 	end repeat

JG

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/