Changeset 1378:df157df9164c
- Timestamp:
- 10/20/09 22:55:08 (2 years ago)
- Branch:
- default
- Parents:
- 1376:0c27d6fe47b2 (diff), 1377:907b0a6f6889 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- trunk
- Files:
-
- 26 deleted
- 2 edited
-
include/libdodo/pcSyncDataCollection.h (deleted)
-
include/libdodo/pcSyncDataSingle.h (deleted)
-
include/libdodo/pcSyncProcessDataCollection.h (deleted)
-
include/libdodo/pcSyncProcessDataCollectionEx.h (deleted)
-
include/libdodo/pcSyncProcessDataSingle.h (deleted)
-
include/libdodo/pcSyncProcessDataSingleEx.h (deleted)
-
include/libdodo/pcSyncProcessSection.h (deleted)
-
include/libdodo/pcSyncProcessSectionEx.h (deleted)
-
include/libdodo/pcSyncProtector.h (modified) (4 diffs)
-
include/libdodo/pcSyncSection.h (deleted)
-
include/libdodo/pcSyncThreadDataCollection.h (deleted)
-
include/libdodo/pcSyncThreadDataCollectionEx.h (deleted)
-
include/libdodo/pcSyncThreadDataSingle.h (deleted)
-
include/libdodo/pcSyncThreadDataSingleEx.h (deleted)
-
include/libdodo/pcSyncThreadSection.h (deleted)
-
include/libdodo/pcSyncThreadSectionEx.h (deleted)
-
src/pcSyncDataCollection.cc (deleted)
-
src/pcSyncDataSingle.cc (deleted)
-
src/pcSyncProcessDataCollection.cc (deleted)
-
src/pcSyncProcessDataSingle.cc (deleted)
-
src/pcSyncProcessLock.inline (deleted)
-
src/pcSyncProcessSection.cc (deleted)
-
src/pcSyncProtector.cc (modified) (2 diffs)
-
src/pcSyncSection.cc (deleted)
-
src/pcSyncThreadDataCollection.cc (deleted)
-
src/pcSyncThreadDataSingle.cc (deleted)
-
src/pcSyncThreadLock.inline (deleted)
-
src/pcSyncThreadSection.cc (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/libdodo/pcSyncProtector.h
r1373 r1378 2 2 * pcSyncProtector.h 3 3 * 4 * Sat Oct 2020074 * Mon Oct 22 2007 5 5 * Copyright 2007 Ni@m 6 6 * niam.niam@gmail.com … … 36 36 namespace pc { 37 37 namespace sync { 38 class section;39 40 38 /** 41 39 * @class protector 42 * @brief provides thread/process safe behaviour 43 * @note it locks in constructor and unlocks in destructor 40 * @brief provides shared data management functionality 44 41 */ 45 42 class protector { … … 47 44 48 45 /** 49 * contructor46 * destructor 50 47 */ 51 protector(section *parent);48 virtual ~protector() = 0; 52 49 53 50 /** 54 * destructor 51 * lock 52 * @param timeout defines wait timeout for unlock in microseconds 53 * @note if timeout is 0 it will wait infinitely 55 54 */ 56 virtual ~protector();55 virtual void acquire(unsigned long timeout) = 0; 57 56 58 protected: 59 60 section *keeper; ///< lock 57 /** 58 * unlock 59 */ 60 virtual void release() = 0; 61 61 }; 62 62 }; … … 64 64 }; 65 65 #endif 66 -
trunk/src/pcSyncProtector.cc
r1373 r1378 2 2 * pcSyncProtector.cc 3 3 * 4 * S at Oct 2020074 * Sun Jul 22 2007 5 5 * Copyright 2007 Ni@m 6 6 * niam.niam@gmail.com … … 32 32 #include <libdodo/pcSyncProtector.h> 33 33 34 #include <libdodo/pcSyncSection.h>35 #include <libdodo/exceptionBasic.h>36 37 34 using namespace dodo::pc::sync; 38 35 39 protector:: protector(section *keeper) : keeper(keeper)36 protector::~protector() 40 37 { 41 if (keeper != NULL)42 keeper->acquire();43 38 } 44 39 45 40 //------------------------------------------------------------------- 46 47 protector::~protector()48 {49 try {50 if (keeper != NULL)51 keeper->release();52 } catch (exception::basic &ex) {53 }54 }55 56 //-------------------------------------------------------------------57
Note: See TracChangeset
for help on using the changeset viewer.
