mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
for Solaris port steps
This commit is contained in:
parent
eb75186f5e
commit
aa160af755
@ -115,7 +115,13 @@ static UCHAR *next_shared_memory;
|
||||
#if defined(FREEBSD) || defined(NETBSD) || defined(SINIXZ)
|
||||
#include <signal.h>
|
||||
#else
|
||||
#ifdef SOLARIS
|
||||
extern "C" {
|
||||
#include <sys/signal.h>
|
||||
};
|
||||
#else
|
||||
#include <sys/signal.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
@ -142,9 +148,11 @@ static UCHAR *next_shared_memory;
|
||||
#define SIGVEC FPTR_INT
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
#ifdef HAVE_SIGACTION
|
||||
#ifndef SOLARIS
|
||||
#define SIGVEC struct sigaction
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GDS_RELAY
|
||||
#define GDS_RELAY "/bin/gds_relay"
|
||||
@ -504,7 +512,7 @@ int ISC_event_wait(SSHORT count,
|
||||
EVENT* events,
|
||||
SLONG* values,
|
||||
SLONG micro_seconds,
|
||||
void (*timeout_handler)(),
|
||||
FPTR_VOID timeout_handler,
|
||||
void* handler_arg)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -56,6 +56,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SOLARIS
|
||||
#include <thread.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@ -203,7 +209,7 @@ THDD THD_get_specific(void)
|
||||
**************************************/
|
||||
THDD current_context;
|
||||
|
||||
if (thr_getspecific(specific_key, ¤t_context)) {
|
||||
if (thr_getspecific(specific_key, (void **) ¤t_context)) {
|
||||
ib_perror("thr_getspecific");
|
||||
exit(1);
|
||||
}
|
||||
@ -541,7 +547,7 @@ int THD_mutex_destroy(MUTX_T * mutex)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
return mutex_destroy(mutex);
|
||||
return mutex_destroy(&mutex->mutx_mutex);
|
||||
}
|
||||
|
||||
|
||||
@ -557,7 +563,7 @@ int THD_mutex_init(MUTX_T * mutex)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
return mutex_init(mutex, USYNC_THREAD, NULL);
|
||||
return mutex_init(&mutex->mutx_mutex, USYNC_THREAD, NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -573,7 +579,7 @@ int THD_mutex_lock(MUTX_T * mutex)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
return mutex_lock(mutex);
|
||||
return mutex_lock(&mutex->mutx_mutex);
|
||||
}
|
||||
|
||||
|
||||
@ -589,7 +595,7 @@ int THD_mutex_unlock(MUTX_T * mutex)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
return mutex_unlock(mutex);
|
||||
return mutex_unlock(&mutex->mutx_mutex);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -1968,10 +1974,10 @@ static int thread_start(
|
||||
if (rval = thr_sigsetmask(SIG_SETMASK, &new_mask, &orig_mask))
|
||||
return rval;
|
||||
#if (defined SUPERCLIENT || defined SUPERSERVER)
|
||||
rval = thr_create(NULL, 0, routine, arg, THR_DETACHED, &thread_id);
|
||||
rval = thr_create(NULL, 0, (void* (*)(void*) )routine, arg, THR_DETACHED, &thread_id);
|
||||
#else
|
||||
rval =
|
||||
thr_create(NULL, 0, routine, arg, (THR_BOUND | THR_DETACHED),
|
||||
thr_create(NULL, 0, (void* (*)(void*) ) routine, arg, (THR_BOUND | THR_DETACHED),
|
||||
&thread_id);
|
||||
#endif
|
||||
(void) thr_sigsetmask(SIG_SETMASK, &orig_mask, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user