MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / sh_mem

Class sh_mem

src/lock/print.cpp:143–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141namespace
142{
143 class sh_mem final : public IpcObject
144 {
145 public:
146 explicit sh_mem(bool p_consistency, const char* filename)
147 : sh_mem_consistency(p_consistency),
148 shared_memory(FB_NEW_POOL(*getDefaultMemoryPool()) SharedMemory<lhb>(filename, 0, this))
149 { }
150
151 bool initialize(SharedMemoryBase*, bool) override
152 {
153 // Initialize a lock table to looking -- i.e. don't do nuthin.
154 return sh_mem_consistency;
155 }
156
157 void mutexBug(int /*osErrorCode*/, const char* /*text*/) override
158 {
159 // Do nothing - lock print always ignored mutex errors
160 }
161
162 USHORT getType() const override { return Firebird::SharedMemoryBase::SRAM_LOCK_MANAGER; }
163 USHORT getVersion() const override { return LHB_VERSION; }
164 const char* getName() const override { return "LockManager"; }
165
166 private:
167 bool sh_mem_consistency;
168
169 public:
170 AutoPtr<SharedMemory<lhb> > shared_memory;
171 };
172}
173
174static void prt_lock_activity(OUTFILE, const lhb*, USHORT, ULONG, ULONG);

Callers 1

CLIB_ROUTINE mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected