harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "史成荣" <icyr...@gmail.com>
Subject Re: [drlvm][jitrino]
Date Sat, 15 Dec 2007 06:33:13 GMT
I still have 2 questions.

First, I know in the Thread Manager, it is the
hythread_thin_monitor_try_enter method to aquire the mutex lock
and implement the *memory barrier.* But* *I looked into the code of this
method, didn't find any memory barrier operations(including the
apr_memory_rw_barrier() call and  cmpxchg operation) when it is the fat
lock. when aquiring the fat lock, it calls the hythread_monitor_try_enter
method. In the hythread_monitor_try_enter method* there isn't *memory
barrier operations, but has a call of the *hymutex_trylock* method. Does the
hymutex_trylock method also has barrier effect built-in?

Second, when exit the synchoronized area, it should release the mutex lock
and flush the local memory to the main memory. But the
hythread_thin_monitor_exit method only release the mutex lock and I don't
find any flushing operation in hythread_thin_monitor_exit method.

I think there must be some mistakes of my idea, hoping for your advice.

>  Thanks,
>  Chengrong

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message