Added Doxygen annotations to dbLock.h

This commit is contained in:
ReBarsotti-HZB authored and GitHub committed 2026-02-27 11:28:00 +00:00
1 parent 06ec85be80
commit 976ef26381
2 files changed
+47 -9

No files matched your search

+46 -9
View File
@@ -24,11 +24,17 @@ extern "C" {
struct dbCommon;
struct dbBase;
/** @brief Lock multiple records.
/**
* @file dbLock.h
* @brief Lock one or multiple records.
*
* A dbLocker allows a caller to simultaneously lock multiple records.
* The list of records is provided to dbLockerAlloc().
* And the resulting dbLocker can be locked/unlocked repeatedly.
* Locking is required to prevent corruption of record fields due to concurrent
* access by different threads.
*/
/** @brief A dbLocker allows a caller to lock a single record or simultaneously
* lock multiple records.
* The list of records is provided to dbLockerAlloc(). And the resulting
* dbLocker can be locked/unlocked repeatedly.
*
* Each thread can only lock one dbLocker at a time.
* While locked, dbScanLock() may be called only on those records
@@ -72,37 +78,68 @@ DBCORE_API void dbLockerFree(dbLocker *plocker);
/** @brief Lock all records of dbLocker
*
* While locked, caller may access any associated record passed to dbLockerAlloc() .
* Locks multiple record. While locked, caller may access any associated record
* passed to dbLockerAlloc().
* dbScanLockMany() may not be called again (multi-lock is not recursive).
* dbScanLock()/dbScanUnlock() may be called on individual record.
* The caller must later call dbScanUnlockMany().
* @since 3.16.0.1
*/
DBCORE_API void dbScanLockMany(dbLocker*);
/** @brief Unlock all records of dbLocker
/** @brief Unlock all records of dbLocker.
*
* Unlocks the records of dbLocker. A thread must call dbScanUnlockMany with the
* same dbLocker* before calling dbScanLockMany again.
* @since 3.16.0.1
*/
DBCORE_API void dbScanUnlockMany(dbLocker*);
/** @brief Returns ID number of the lockset*/
DBCORE_API unsigned long dbLockGetLockId(
struct dbCommon *precord);
/** @brief During IOC startup the complete list of records is iterated by
* dbLockInitRecords
*
* The required locksets are created and populated based on the links defined
* at the time of IOC startup*/
DBCORE_API void dbLockInitRecords(struct dbBase *pdbbase);
/** @brief Frees up locksets which are no longer in use. If lockset is still active, prints warning and calls `dblsr`*/
DBCORE_API void dbLockCleanupRecords(struct dbBase *pdbbase);
/* Lock Set Report */
/** @brief Lock Set Report
*
* Generates a report showing the lock set to which each record belongs.
* If recordname is 0, "", "*" all records are shown. Otherwise only records
* in the same lock set as recordname are shown. Level can have the following
* values:
*
* 0 - show lock set information only
*
* 1 - show each record in the lock set
*
* 2 - show each record and all database links in the lock set
*/
DBCORE_API long dblsr(char *recordname,int level);
/* If recordname NULL then all records*/
/* level = (0,1,2) (lock set state, + recordname, +DB links) */
/** @brief Displays free and active locksets
*/
DBCORE_API long dbLockShowLocked(int level);
/*KLUDGE to support field TPRO*/
/** @brief Support for TPRO field */
DBCORE_API int * dbLockSetAddrTrace(struct dbCommon *precord);
/* debugging */
/** @brief Returns the reference count */
DBCORE_API unsigned long dbLockGetRefs(struct dbCommon*);
/** @brief Returns the number of active locksets*/
DBCORE_API unsigned long dbLockCountSets(void);
#ifdef __cplusplus