[haiku-bugs] Re: [Haiku] #4722: acpi warnings during jam (gcc2 build on ubuntu 9.04)

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 28 Nov 2009 15:42:50 -0000

#4722: acpi warnings during jam (gcc2 build on ubuntu 9.04)
-----------------------------+----------------------------------------------
 Reporter:  scottmc          |       Owner:  czeidler 
     Type:  bug              |      Status:  new      
 Priority:  normal           |   Milestone:  R1       
Component:  Kits/Kernel Kit  |     Version:  R1/alpha1
 Keywords:                   |   Blockedby:           
 Platform:  All              |    Blocking:           
-----------------------------+----------------------------------------------

Comment(by bonefish):

 It's not particularly complex. See the attached patch for a possible
 mutex_lock_with_timeout() implementation (utterly untested, though). It's
 mostly identical to the mutex_lock() implementation, save for the use of
 thread_block_with_timeout_locked() instead of thread_block_locked() and
 the additional cleanup needed when the timeout does indeed occur. Since in
 such a case it is also necessary to fix the mutex' count field (!KDEBUG),
 the new field ignore_unlock_count had to be added to work around a race
 condition with mutex_unlock().

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

Other related posts: