8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 08:03:03 +01:00
This commit is contained in:
alexpeshkoff 2012-07-25 11:11:55 +00:00
parent 85bb950aa6
commit edd1b8289e
2 changed files with 5 additions and 4 deletions

View File

@ -281,9 +281,10 @@ static const char* semName = "/firebird_temp_sem";
}
timespec timeout = getCurrentTime();
nanoseconds += timeout.tv_nsec;
timeout.tv_sec += nanoseconds / 1000000000l;
timeout.tv_nsec = nanoseconds % 1000000000l;
timeout.tv_sec += milliseconds / 1000;
timeout.tv_nsec += (milliseconds % 1000) * 1000000;
timeout.tv_sec += (timeout.tv_nsec / 1000000000l);
timeout.tv_nsec %= 1000000000l;
err = pthread_cond_timedwait(&cv, &mu, &timeout);
mtxUnlock();

View File

@ -88,7 +88,7 @@ private:
if (sigsetjmp(sigenv, 1) == 0)
{
Firebird::sync_signals_set(&sigenv);
if (pthread_kill(thread, 0) == ESRCH)
if (pthread_kill((pthread_t)thread, 0) == ESRCH)
{
// Thread does not exist any more
thread = currTID;