AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

please help with JNI and pthread

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed May 16, 2007 7:11 am    Post subject: please help with JNI and pthread Reply with quote



Hi,

I have a JNI library. I have a critical section that makes no JNI
callbacks into the java bytecodes, just several C++ statements that
change memory.

On which JREs and platforms (if any) can I protect such a critical
section with a pthread mutex (or Win32 mutex) with the same acquire/
release semantics that a pthread mutex normally offers relative to the
java threads. I.e. could a signal allow another java thread to
somehow enter the critical section held by the thread already in it?

The problem for me is that MonitorEnter and MonitorExit are very slow
in comparison to a native mutex.

Andy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> JVM, native methods and hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.