Xref: utzoo comp.sys.next:5467 comp.os.mach:324 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!iuvax!uceng!uccba!spca6!kgw2!dennisg From: dennisg@kgw2.bwi.WEC.COM (Dennis Glatting) Newsgroups: comp.sys.next,comp.os.mach Subject: technique used to implement mutex_lock() Message-ID: <429@kgw2.bwi.WEC.COM> Date: 16 Mar 90 18:48:46 GMT Reply-To: dennisg@kgw2 () Followup-To: comp.sys.next Distribution: na Organization: Xetron Corporation, Cincinnati, Ohio Lines: 14 how is mutex_lock() implemented in the NeXT computer? i have several tasks with several threads each. i had a thread lock a mutex with mutex_lock() then, unfortunatly, died. the mutex stayed locked. i noticed that the NeXT was running a bit slow so i fired up gdb of the task in question. i found more than one thread in cthread_yield(). my question is: when you call mutex_lock() and the mutex is locked then what happens? does the thread do a cthread_yield() until the mutex is unlocked? if that is true then why? it seems a waste of cpu. -- dennisg@kgw2.bwi.WEC.COM | Dennis P. Glatting ..!uunet!tron!kgw2!dennisg |