Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

int phMutex::decLockCount  )  [protected]

For internal use only.

Decrement the lock count value (m_locked_count) by one. Only the owner of the mutex can decrement the lock count. If there is currently an owner (stored in m_owner) of this mutex and the lock count is now zero, the the owner value is set to phMutex_INVALIDOWNER which will allow another thread to increment the value after the current thread releases the mutex. If a thread that doesn't own this mutex tries to call decLockCount (from the phMutex::unlock() method) then it will fail because the owner value won't be equal to it's thread id.

Careful placement is required for any call to this method to prevent any inconsistencies with state.

Definition at line 312 of file phMutex.cpp.

Copyright (C) 2002 - 2007 Philip D.S. Thoren ( )
University Of Massachusetts at Lowell
Robotics Lab Logo

Generated on Sat Jun 16 02:45:00 2007 for phission by  doxygen 1.4.4