1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OSL_SIGNAL_H
21 #define INCLUDED_OSL_SIGNAL_H
23 #include <sal/config.h>
25 #include <sal/saldllapi.h>
26 #include <sal/types.h>
32 #define OSL_SIGNAL_USER_RESERVED 0
34 #define OSL_SIGNAL_USER_RESOURCEFAILURE (OSL_SIGNAL_USER_RESERVED - 1)
35 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
37 typedef void* oslSignalHandler
;
43 osl_Signal_AccessViolation
,
44 osl_Signal_IntegerDivideByZero
,
45 osl_Signal_FloatDivideByZero
,
46 osl_Signal_DebugBreak
,
49 osl_Signal_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
54 osl_Signal_ActCallNextHdl
,
56 osl_Signal_ActAbortApp
,
57 osl_Signal_ActKillApp
,
58 osl_Signal_Act_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
62 # pragma pack(push, 8)
76 /** the function-ptr. representing the signal handler-function.
78 typedef oslSignalAction (SAL_CALL
*oslSignalHandlerFunction
)(void* pData
, oslSignalInfo
* pInfo
);
80 SAL_DLLPUBLIC oslSignalHandler SAL_CALL
osl_addSignalHandler(
81 oslSignalHandlerFunction Handler
, void* pData
);
83 SAL_DLLPUBLIC sal_Bool SAL_CALL
osl_removeSignalHandler(
84 oslSignalHandler hHandler
);
86 SAL_DLLPUBLIC oslSignalAction SAL_CALL
osl_raiseSignal(
87 sal_Int32 UserSignal
, void* UserData
);
89 /** Enables or disables error reporting
91 On default error reporting is enabled after process startup.
94 Enables or disables error reporting.
96 @retval sal_True if previous state of error reporting was enabled
97 @retval sal_False if previous state of error reporting was disabled
100 SAL_DLLPUBLIC sal_Bool SAL_CALL
osl_setErrorReporting(
107 #endif // INCLUDED_OSL_SIGNAL_H
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */