This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Since I've been looking at libgcj's use of posix threads I came across this bit of code which uses _Jv_Mutex_t to synchronize access to a data structure. This is guaranteed to use the underlying system's mutex primitives. We can do a little better by using object synchronization and our own lightweight locks.
Perhaps this is a micro-optimization, but it also collapses the locking code down from three places to a single code fragment.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |