Skip to content

Commit 9abf694

Browse files
committed
Merge branch 'work/7809' into v4.0-release
2 parents 9d22186 + 10c2e8e commit 9abf694

File tree

2 files changed

+257
-330
lines changed

2 files changed

+257
-330
lines changed

src/common/isc_s_proto.h

+8-14
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,16 @@ class MemoryHeader
178178
#define USE_FCNTL
179179
#endif
180180

181-
class CountedFd;
181+
class SharedFileInfo;
182182

183183
class FileLock
184184
{
185185
public:
186186
enum LockMode {FLM_EXCLUSIVE, FLM_TRY_EXCLUSIVE, FLM_SHARED, FLM_TRY_SHARED};
187187

188188
typedef void InitFunction(int fd);
189-
explicit FileLock(const char* fileName, InitFunction* init = NULL); // main ctor
190-
FileLock(const FileLock* main, int s); // creates additional lock for existing file
189+
190+
explicit FileLock(const char* fileName, InitFunction* init = NULL);
191191
~FileLock();
192192

193193
// Main function to lock file
@@ -196,24 +196,18 @@ class FileLock
196196
// Alternative locker is using status vector to report errors
197197
bool setlock(Firebird::CheckStatusWrapper* status, const LockMode mode);
198198

199-
// unlocking can only put error into log file - we can't throw in dtors
199+
// Unlocking can only put error into log file - we can't throw in dtors
200200
void unlock();
201201

202+
// Obvious access to file descriptor
202203
int getFd();
203204

204-
private:
205205
enum LockLevel {LCK_NONE, LCK_SHARED, LCK_EXCL};
206206

207+
private:
208+
Firebird::RefPtr<SharedFileInfo> file;
209+
InitFunction* initFunction;
207210
LockLevel level;
208-
CountedFd* oFile;
209-
#ifdef USE_FCNTL
210-
int lStart;
211-
#endif
212-
class CountedRWLock* rwcl; // Due to order of init in ctor rwcl must go after fd & start
213-
214-
Firebird::string getLockId();
215-
class CountedRWLock* getRw();
216-
void rwUnlock();
217211
};
218212

219213
#endif // UNIX

0 commit comments

Comments
 (0)