EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbLock.h
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * SPDX-License-Identifier: EPICS
7 * EPICS Base is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /* dbLock.h */
11 /* Author: Marty Kraimer Date: 12MAR96 */
12 
13 #ifndef INCdbLockh
14 #define INCdbLockh
15 
16 #include <stddef.h>
17 
18 #include "ellLib.h"
19 #include "dbCoreAPI.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct dbCommon;
26 struct dbBase;
39 struct dbLocker;
40 typedef struct dbLocker dbLocker;
41 
49 DBCORE_API void dbScanLock(struct dbCommon *precord);
54 DBCORE_API void dbScanUnlock(struct dbCommon *precord);
55 
63 DBCORE_API dbLocker *dbLockerAlloc(struct dbCommon * const *precs,
64  size_t nrecs,
65  unsigned int flags);
66 
71 DBCORE_API void dbLockerFree(dbLocker *plocker);
72 
81 DBCORE_API void dbScanLockMany(dbLocker*);
85 DBCORE_API void dbScanUnlockMany(dbLocker*);
86 
87 DBCORE_API unsigned long dbLockGetLockId(
88  struct dbCommon *precord);
89 
90 DBCORE_API void dbLockInitRecords(struct dbBase *pdbbase);
91 DBCORE_API void dbLockCleanupRecords(struct dbBase *pdbbase);
92 
93 
94 /* Lock Set Report */
95 DBCORE_API long dblsr(char *recordname,int level);
96 /* If recordname NULL then all records*/
97 /* level = (0,1,2) (lock set state, + recordname, +DB links) */
98 
99 DBCORE_API long dbLockShowLocked(int level);
100 
101 /*KLUDGE to support field TPRO*/
102 DBCORE_API int * dbLockSetAddrTrace(struct dbCommon *precord);
103 
104 /* debugging */
105 DBCORE_API unsigned long dbLockGetRefs(struct dbCommon*);
106 DBCORE_API unsigned long dbLockCountSets(void);
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif /*INCdbLockh*/
Declaration of dbCommon.
Definition: dbCommon.h:18
A doubly-linked list library.
Definition: dbBase.h:175