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

Use correct type for event handle and remove few unneeded casts.

This commit is contained in:
hvlad 2021-03-14 01:57:39 +02:00
parent ffaf62b5ff
commit 45bdd2ed5a
3 changed files with 7 additions and 7 deletions

View File

@ -713,7 +713,7 @@ void SharedMemoryBase::eventFini(event_t* event)
if (event->event_pid == process_id)
{
CloseHandle((HANDLE) event->event_handle);
CloseHandle(event->event_handle);
}
#else // pthread-based event
@ -749,7 +749,7 @@ SLONG SharedMemoryBase::eventClear(event_t* event)
#if defined(WIN_NT)
ResetEvent((HANDLE) event->event_handle);
ResetEvent(event->event_handle);
return event->event_count + 1;
@ -874,7 +874,7 @@ int SharedMemoryBase::eventPost(event_t* event)
if (event->event_pid != process_id)
return ISC_kill(event->event_pid, event->event_id, event->event_handle);
return SetEvent((HANDLE) event->event_handle) ? FB_SUCCESS : FB_FAILURE;
return SetEvent(event->event_handle) ? FB_SUCCESS : FB_FAILURE;
#else // pthread-based event

View File

@ -26,7 +26,7 @@
#ifdef WIN_NT
// This will poke event
int ISC_kill(SLONG, SLONG, void *);
int ISC_kill(SLONG, SLONG, HANDLE);
#else
// And that are functions to manage UNIX signals
bool ISC_signal(int, FPTR_VOID_PTR, void *);
@ -34,7 +34,7 @@ void ISC_signal_cancel(int, FPTR_VOID_PTR, void *);
#endif
#ifdef WIN_NT
void* ISC_make_signal(bool, bool, int, int);
HANDLE ISC_make_signal(bool, bool, int, int);
#endif
void ISC_signal_init();

View File

@ -150,7 +150,7 @@ private:
Firebird::GlobalPtr<OpenEvents> openEvents;
int ISC_kill(SLONG pid, SLONG signal_number, void *object_hndl)
int ISC_kill(SLONG pid, SLONG signal_number, HANDLE object_hndl)
{
/**************************************
*
@ -176,7 +176,7 @@ int ISC_kill(SLONG pid, SLONG signal_number, void *object_hndl)
return SetEvent(handle) ? 0 : -1;
}
void* ISC_make_signal(bool /*create_flag*/, bool manual_reset, int process_idL, int signal_number)
HANDLE ISC_make_signal(bool /*create_flag*/, bool manual_reset, int process_idL, int signal_number)
{
/**************************************
*