2003-09-08 22:33:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: JRD Access Method
|
|
|
|
* MODULE: isc_i_proto.h
|
|
|
|
* DESCRIPTION: Prototype header file for isc_ipc.c
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
|
|
|
*/
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#ifndef JRD_ISC_I_PROTO_H
|
|
|
|
#define JRD_ISC_I_PROTO_H
|
2003-09-08 22:33:42 +02:00
|
|
|
|
|
|
|
// This will install FP overflow signal handler
|
2003-10-03 03:53:34 +02:00
|
|
|
void ISC_enter(void);
|
|
|
|
void ISC_exit(void);
|
2003-09-08 22:33:42 +02:00
|
|
|
|
|
|
|
#ifdef WIN_NT
|
|
|
|
// This will poke event
|
2004-05-29 15:34:54 +02:00
|
|
|
int ISC_kill(SLONG, SLONG, void *);
|
2003-09-08 22:33:42 +02:00
|
|
|
#else
|
|
|
|
// And that are functions to manage UNIX signals
|
2003-10-03 03:53:34 +02:00
|
|
|
int ISC_kill(SLONG, SLONG);
|
2007-01-20 15:45:45 +01:00
|
|
|
bool ISC_signal(int, FPTR_VOID_PTR, void *);
|
|
|
|
void ISC_signal_cancel(int, FPTR_VOID_PTR, void *);
|
2003-09-08 22:33:42 +02:00
|
|
|
#endif
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
void ISC_signal_init(void);
|
2003-09-08 22:33:42 +02:00
|
|
|
|
2007-02-22 17:47:39 +01:00
|
|
|
|
|
|
|
class SignalInhibit
|
|
|
|
//
|
|
|
|
// This class inhibits signals' processing during I/O
|
|
|
|
// activity and re-enables it afterwards.
|
|
|
|
//
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
#ifndef WIN_NT
|
|
|
|
// Constructor inhibits processing of signals.
|
|
|
|
// Signals will be retained until signals are
|
|
|
|
// eventually re-enabled, then re-posted.
|
|
|
|
SignalInhibit() throw();
|
|
|
|
// Destructor enables signal processing
|
|
|
|
// and re-posts any pending signals.
|
|
|
|
~SignalInhibit() throw()
|
|
|
|
{
|
|
|
|
enable();
|
|
|
|
}
|
|
|
|
// Let one re-enable signals in advance
|
|
|
|
void enable() throw();
|
|
|
|
#else
|
|
|
|
// Just stubs
|
|
|
|
SignalInhibit() throw() { }
|
|
|
|
~SignalInhibit() throw() { }
|
|
|
|
void enable() throw() { }
|
|
|
|
#endif
|
|
|
|
private:
|
|
|
|
// Forbid copy constructor
|
|
|
|
SignalInhibit(const SignalInhibit&);
|
|
|
|
#ifndef WIN_NT
|
|
|
|
bool enabled;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#endif /* JRD_ISC_I_PROTO_H */
|