From: Yair H. <ya...@01...> - 2005-04-19 20:16:58
|
hi in my driver i wish to clean a command after getting it. so i need to call CleanCommand after GetCommand, then of course i need to lock the two together so i will clean the correct command. the code looks like this: Lock(); GetCommand(); CleanCommand(); Unlock(); this of course is a DEAD LOCK. the access mutex is NON RECURSIVE. solution is either a GetAndCleanCommand() method which will Lock both together , or declaring access mutex as recursive (which shouldn't have any effect on written code). any objections to this? yair |