[Mono-list] How to implement the monitor synchronization?

Morten Sylvest Olsen pbk1105@pbk.dk
Tue, 13 Nov 2001 19:01:55 +0100 (CET)


Hi..

I don't work on mono, but am currently doing a project where I among other
things compare the Java JVM to the .NET CLI.

Will probably try to make some kind of (part of) .NET->JVM translator.
Just to be in opposition ;-)


The JVM has monitorenter/exit instructions to implement synchronization.
The CLI does not. And more, it does not even have instructions to
implement a simpel semaphore,

From what I could gather from the mcs classes the monitor Enter/Exit are
to be implemented with a native call.

I guess the runtime shall automagically prevent scheduling during native
calls?!?

Or did I get something backwards?

- Morten

"Elves and Dragons!" I says to him.  "Cabbages and potatoes are better
for you and me."
		-- J. R. R. Tolkien
----------------------------------------------------------
email: morten@bergsoe.k-net.dk,c958496@student.dtu.dk
addresse: Bergsøe Kollegiet v. 1105 2850 Nærum
----------------------------------------------------------