Re: spin_unlock optimization(i386)

Folkert van Heusden (fvh@keetweej.demon.nl)
Tue, 07 Dec 1999 18:45:37 -0100


Gerard Roudier wrote:
> In my opinion, 2 agents that write to the same location (current_state)
> without any synchronisation can only mess up any kind of ordering that
> applies to the view of all agents observing a single agent.

Speaking about messing up; also writing to 2 bytes located after each
other by 2 processors can mess up things. On a Sparc processor for
example.
e.g.:

char dummy[2];

when processor 1 writes to dummy[0] at the same time as processor 2
writes to
dummy[1], you'll get into trouble.

...

Ehrm, I'm not sure why I wrote it down here since it has nothing to do
with the
thread. Sorry for that, probably my ego needing some boost.

-- 
------------------------------------------------------------
Folkert van Heusden
some e-mail addresses: f.v.heusden@ftr.nl, flok99@dds.nl
mobile phone: +31-6-22390057

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/