diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.cpp | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.cpp b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.cpp deleted file mode 100644 index 0fe25901e2a..00000000000 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- C++ -*- */ - -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// cos -// -// = FILENAME -// CC_LockSet.cpp -// -// = AUTHOR -// Torben Worm <tworm@cs.wustl.edu> -// -// ============================================================================ - -#include "CC_LockSet.h" - -// Default constructor. We cannot create the lock at this point because we -// are not locking anything, and we do not know the mode of the lock. In a -// full fledged version the lock set (implementation) will be instantiated -// here -CC_LockSet::CC_LockSet(void) - : related_lockset_ (0) -{ - // Do nothing -} - -// Constructor used to create related lock sets. -CC_LockSet::CC_LockSet(CosConcurrencyControl::LockSet_ptr related) - : related_lockset_ (related) -{ - // Do nothing -} - -// Destructor. Remove the lock if it exists. In a later version the lock set -// must be removed here. Actually if all locks have been unlocked no lock -// instances should exist at this point. -CC_LockSet::~CC_LockSet(void) -{ - if(lock_!=0) - delete lock_; -} - -// Locks the lock in the desired mode. Blocks until success. In a later -// version the lock set should be searched for incompatible locks -void CC_LockSet::lock(CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env) -{ - if(lock==0) { - lock_ = new CC_Lock(mode); - } - lock_->lock(); -} - -// Tries to lock. If it is not possible false is returned. Comments for lock -// holds for later version -CORBA::Boolean CC_LockSet::try_lock(CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env) -{ - return lock_->try_lock(); -} - -// Drops the specified lock. In this simple case we have only one lock at -// any time so we just drop that lock. -void CC_LockSet::unlock(CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env) -{ - lock_->unlock(); -} - -// Changes the mode of a held lock. In this version we deal with only -// one type of lock (in reality) and therefore the type is of no meaning -void CC_LockSet::change_mode (CosConcurrencyControl::lock_mode held_mode, - CosConcurrencyControl::lock_mode new_mode, - CORBA::Environment &env) -{ - lock_->change_mode(new_mode); -} - |