[haiku-bugs] Re: [Haiku] #5336: pthread_mutex_trylock() hangs

  • From: "stippi" <trac@xxxxxxxxxxxx>
  • Date: Mon, 08 Mar 2010 10:40:19 -0000

#5336: pthread_mutex_trylock() hangs
--------------------------+-------------------------------------------------
 Reporter:  kaliber       |       Owner:  nobody        
     Type:  bug           |      Status:  new           
 Priority:  normal        |   Milestone:  R1            
Component:  System/POSIX  |     Version:  R1/Development
 Keywords:                |   Blockedby:                
 Platform:  All           |    Blocking:                
--------------------------+-------------------------------------------------

Comment(by stippi):

 I've looked into this problem a bit, but I am not quite sure why the
 pthread_mutex_trylock() implementation is the problem (also from talking
 to Axel). I understand that by doing what it does, it potentially converts
 a benaphore style mutex into a semaphore based one. Is the hanging problem
 then in the kernel implementation with the 0 absolute timeout? If
 pthread_mutex_trylock() only touches the count, how would it work when the
 mutex has alreasy been converted to be semaphore based?

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5336#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: