8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00
This commit is contained in:
asfernandes 2010-06-26 01:18:53 +00:00
parent 82e3505af8
commit 5baf890a21
7 changed files with 53 additions and 44 deletions

View File

@ -98,12 +98,14 @@ private:
return 0;
}
/* static void init_shmem(void* arg, sh_mem* shmem, bool init)
/*
static void init_shmem(void* arg, sh_mem* shmem, bool init)
{
EventManager* const eventMgr = static_cast<EventManager*>(arg);
eventMgr->init_shmem(shmem, init);
}
*/
static void mutex_bugcheck(const TEXT*, int);
static void punt(const TEXT*);

View File

@ -232,7 +232,7 @@ public:
enum MemoryTypes
{
SRAM_LOCK_MANAGER = 0xFF, // To avoid mixing with old files no matter of endianness
SRAM_DATABASE_SNAPSHOT = 0xFE, // use downcount for shared memeory types
SRAM_DATABASE_SNAPSHOT = 0xFE, // use downcount for shared memory types
SRAM_EVENT_MANAGER = 0xFD,
SRAM_TRACE_CONFIG = 0xFC,
SRAM_TRACE_LOG = 0xFB
@ -247,7 +247,9 @@ class SharedMemory : public SharedMemoryBase
{
public:
SharedMemory()
: SharedMemoryBase(), sh_mem_header(NULL) { }
: SharedMemoryBase(), sh_mem_header(NULL)
{ }
~SharedMemory()
{
if (sh_mem_header)

View File

@ -1617,7 +1617,7 @@ ULONG ISC_exception_post(ULONG except_code, const TEXT* err_msg)
"\tto terminate abnormally.", err_msg);
break;
case EXCEPTION_STACK_OVERFLOW:
Firebird::status_exception::raise(Firebird::Arg::Gds(isc_exception_stack_overflow));
status_exception::raise(Arg::Gds(isc_exception_stack_overflow));
// This will never be called, but to be safe it's here
result = (ULONG) EXCEPTION_CONTINUE_EXECUTION;
is_critical = false;
@ -1693,7 +1693,7 @@ void SharedMemoryBase::removeMapFile()
#ifdef UNIX
bool SharedMemoryBase::mapFile(Firebird::Arg::StatusVector& statusVector,
bool SharedMemoryBase::mapFile(Arg::StatusVector& statusVector,
const TEXT* filename, ULONG length)
{
/**************************************
@ -1926,7 +1926,7 @@ bool SharedMemoryBase::mapFile(Firebird::Arg::StatusVector& statusVector,
#ifdef WIN_NT
bool SharedMemoryBase::mapFile(Firebird::Arg::StatusVector& statusVector,
bool SharedMemoryBase::mapFile(Arg::StatusVector& statusVector,
const TEXT* filename, ULONG length)
{
/**************************************
@ -3263,7 +3263,7 @@ bool SharedMemoryBase::remapFile(Arg::StatusVector& statusVector,
#ifndef ISC_REMAP_FILE_DEFINED
bool SharedMemoryBase::remapFile(Firebird::Arg::StatusVector& statusVector, ULONG, bool)
bool SharedMemoryBase::remapFile(Arg::StatusVector& statusVector, ULONG, bool)
{
/**************************************
*
@ -3643,7 +3643,7 @@ SharedMemoryBase::~SharedMemoryBase()
{
}
void SharedMemoryBase::logError(const char* text, const Firebird::Arg::StatusVector& status)
void SharedMemoryBase::logError(const char* text, const Arg::StatusVector& status)
{
iscLogStatus(text, status.value());
}

View File

@ -446,30 +446,34 @@ private:
public:
Extent() { }
Extent(Firebird::MemoryPool&) { }
Extent(const SharedMemoryBase& p)
{
assign(p);
}
Extent(Firebird::MemoryPool&, const SharedMemoryBase& p)
{
assign(p);
}
Extent& operator=(const SharedMemoryBase& p)
{
assign(p);
return *this;
}
~Extent()
{
sh_mem_header = NULL; // avoid unmapping in dtor
}
Extent& operator=(const SharedMemoryBase& p)
{
assign(p);
return *this;
}
void assign(const SharedMemoryBase& p);
bool initialize(bool init);
void mutexBug(int osErrorCode, const char* text);
};
Firebird::ObjectsArray<Extent> m_extents;
ULONG getTotalMapped() const

View File

@ -86,7 +86,8 @@ struct waitque
SRQ_PTR waitque_entry[30];
};
namespace {
namespace
{
class sh_mem : public Jrd::SharedMemory<lhb>
{
public: