From: Alexander P. <ale...@us...> - 2009-06-03 13:16:56
|
Build Version : T2.5.0.24017 Firebird 2.5 Beta 1 (writeBuildNum.sh,v 1.24181 2009/06/03 12:41:04 alexpeshkof ) Update of /cvsroot/firebird/firebird2/src/jrd In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4116 Modified Files: isc_sync.cpp Log Message: Fixed SYSV semaphores + const correctness + cleanup Index: isc_sync.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/isc_sync.cpp,v retrieving revision 1.198 retrieving revision 1.199 diff -b -U3 -r1.198 -r1.199 --- isc_sync.cpp 2 Jun 2009 06:27:23 -0000 1.198 +++ isc_sync.cpp 3 Jun 2009 12:41:02 -0000 1.199 @@ -314,7 +314,6 @@ #ifdef USE_SYS5SEMAPHORE -static void alarm_handler(void* arg); // I don't see who uses this function. static SLONG create_semaphores(ISC_STATUS *, SLONG, int); namespace { @@ -323,10 +322,10 @@ int sharedCount = 0; int fd_init = -1; + // this struct is mapped into shared file class SemTable { public: - // this struct is mapped into shared file const static int N_FILES = 8; const static int N_SETS = 256; #ifdef DEV_BUILD @@ -580,8 +579,8 @@ private: int fileNum; - UCHAR* from; - UCHAR* to; + const UCHAR* from; + const UCHAR* to; static Storage sharedFiles; static GlobalPtr<Mutex> mutex; @@ -616,7 +615,10 @@ { fb_assert(fNum > 0 && fNum <= N_FILES); + if (release) + { filesTable[fNum - 1].name[0] = 0; + } MutexLockGuard guard(idCacheMutex); for (int n = 0; n < lastSet; ++n) @@ -884,6 +886,7 @@ } timerFini->release(); + return 0; } } @@ -3811,20 +3814,6 @@ } } - -static void alarm_handler(void* arg) -{ -/************************************** - * - * a l a r m _ h a n d l e r ( U N I X ) - * - ************************************** - * - * Functional description - * Handle an alarm clock interrupt. - * - **************************************/ -} #endif void longjmp_sig_handler(int sig_num) |