8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 18:03:02 +01:00

Removed the code under the SERVER macro as not used.

This commit is contained in:
dimitr 2006-04-25 14:17:41 +00:00
parent d0bcc2d030
commit d6f3ce6424

View File

@ -65,10 +65,6 @@
#define MUTEX event_mutex #define MUTEX event_mutex
#endif #endif
#ifdef SERVER
#undef MULTI_THREAD
#endif
#ifndef AST_TYPE #ifndef AST_TYPE
#define AST_TYPE void #define AST_TYPE void
#endif #endif
@ -296,28 +292,7 @@ EVH EVENT_init(ISC_STATUS* status_vector, bool server_flag)
EVENT_default_size = Config::getEventMemSize(); EVENT_default_size = Config::getEventMemSize();
#ifdef SERVER #ifdef UNIX
EVENT_data.sh_mem_address = EVENT_header =
(EVH) gds__alloc((SLONG) EVENT_default_size);
/* FREE: apparently only freed at process exit */
if (!EVENT_header) { /* NOMEM: */
status_vector[0] = isc_arg_gds;
status_vector[1] = isc_virmemexh;
status_vector[2] = isc_arg_end;
return NULL;
}
#ifdef DEBUG_GDS_ALLOC
/* This structure is apparently only freed when the process exits */
/* 1994-October-25 David Schnepper */
gds_alloc_flag_unfreed((void *) EVENT_header);
#endif /* DEBUG_GDS_ALLOC */
EVENT_data.sh_mem_length_mapped = EVENT_default_size;
EVENT_data.sh_mem_mutex_arg = 0;
init((SLONG) 0, &EVENT_data, true);
#else
#if (defined UNIX)
EVENT_data.sh_mem_semaphores = SEMAPHORES; EVENT_data.sh_mem_semaphores = SEMAPHORES;
#endif #endif
@ -329,14 +304,9 @@ EVH EVENT_init(ISC_STATUS* status_vector, bool server_flag)
init, 0, EVENT_default_size, init, 0, EVENT_default_size,
&EVENT_data))) &EVENT_data)))
{ {
#ifdef SERVER
gds__free(EVENT_data.sh_mem_address);
#endif /* SERVER */
return NULL; return NULL;
} }
#endif
gds__register_cleanup(exit_handler, 0); gds__register_cleanup(exit_handler, 0);
#ifdef UNIX #ifdef UNIX
@ -536,10 +506,8 @@ static EVH acquire(void)
EVENT_header->evh_current_process = EVENT_process_offset; EVENT_header->evh_current_process = EVENT_process_offset;
#else #else
if (++acquire_count == 1) { if (++acquire_count == 1) {
#ifndef SERVER
if (mutex_state = ISC_mutex_lock(MUTEX)) if (mutex_state = ISC_mutex_lock(MUTEX))
mutex_bugcheck("mutex lock", mutex_state); mutex_bugcheck("mutex lock", mutex_state);
#endif
EVENT_header->evh_current_process = EVENT_process_offset; EVENT_header->evh_current_process = EVENT_process_offset;
} }
#endif #endif
@ -1078,13 +1046,11 @@ static void exit_handler(void* arg)
ISC_STATUS_ARRAY local_status; ISC_STATUS_ARRAY local_status;
#ifndef SERVER
#ifdef SOLARIS_MT #ifdef SOLARIS_MT
ISC_unmap_object(local_status, &EVENT_data, (UCHAR**)&EVENT_process, ISC_unmap_object(local_status, &EVENT_data, (UCHAR**)&EVENT_process,
sizeof(prb)); sizeof(prb));
#endif #endif
ISC_unmap_file(local_status, &EVENT_data, 0); ISC_unmap_file(local_status, &EVENT_data, 0);
#endif
EVENT_header = NULL; EVENT_header = NULL;
} }
@ -1231,11 +1197,9 @@ static void init(void* arg, SH_MEM shmem_data, bool initialize)
SRQ_INIT(EVENT_header->evh_processes); SRQ_INIT(EVENT_header->evh_processes);
SRQ_INIT(EVENT_header->evh_events); SRQ_INIT(EVENT_header->evh_events);
#ifndef SERVER
#if !defined(WIN_NT) #if !defined(WIN_NT)
if (mutex_state = ISC_mutex_init(MUTEX, shmem_data->sh_mem_mutex_arg)) if (mutex_state = ISC_mutex_init(MUTEX, shmem_data->sh_mem_mutex_arg))
mutex_bugcheck("mutex init", mutex_state); mutex_bugcheck("mutex init", mutex_state);
#endif
#endif #endif
FRB free = (FRB) ((UCHAR*) EVENT_header + sizeof(evh)); FRB free = (FRB) ((UCHAR*) EVENT_header + sizeof(evh));
@ -1339,10 +1303,6 @@ static void post_process(PRB process)
process->prb_flags |= PRB_pending; process->prb_flags |= PRB_pending;
release(); release();
#ifdef SERVER
deliver();
#else
#ifdef MULTI_THREAD #ifdef MULTI_THREAD
ISC_event_post(process->prb_event); ISC_event_post(process->prb_event);
#else #else
@ -1354,7 +1314,6 @@ static void post_process(PRB process)
#endif #endif
acquire(); acquire();
#endif
} }
@ -1428,10 +1387,8 @@ static void release(void)
#else #else
if (!--acquire_count) { if (!--acquire_count) {
EVENT_header->evh_current_process = 0; EVENT_header->evh_current_process = 0;
#ifndef SERVER
if (mutex_state = ISC_mutex_unlock(MUTEX)) if (mutex_state = ISC_mutex_unlock(MUTEX))
mutex_bugcheck("mutex lock", mutex_state); mutex_bugcheck("mutex lock", mutex_state);
#endif
#ifdef UNIX #ifdef UNIX
if (EVENT_process_offset) { if (EVENT_process_offset) {
PRB process = (PRB) SRQ_ABS_PTR(EVENT_process_offset); PRB process = (PRB) SRQ_ABS_PTR(EVENT_process_offset);