Kaydet (Commit) 7a2d55a1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix Windows part of 97858ca0

"tdf#93548 Refactor sal signal to reduce code duplication"

Change-Id: Ib0a872fb6023b6989c7931f4d57d911ddf76936f
üst 9329618e
...@@ -30,18 +30,15 @@ struct oslSignalHandlerImpl ...@@ -30,18 +30,15 @@ struct oslSignalHandlerImpl
oslSignalHandlerImpl* pNext; oslSignalHandlerImpl* pNext;
}; };
typedef void (*ErrorReportingChangedHandler)(bool);
extern bool bErrorReportingEnabled; extern bool bErrorReportingEnabled;
extern bool bInitSignal; extern bool bInitSignal;
void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler);
oslSignalAction callSignalHandler(oslSignalInfo* pInfo); oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
// platform-specific functions that need to be implemented // platform-specific functions that need to be implemented
bool onInitSignal(); bool onInitSignal();
bool onDeInitSignal(); bool onDeInitSignal();
void onErrorReportingChanged(bool enabled);
#endif #endif
...@@ -31,8 +31,6 @@ namespace ...@@ -31,8 +31,6 @@ namespace
oslSignalHandlerImpl* SignalList; oslSignalHandlerImpl* SignalList;
oslMutex SignalListMutex; oslMutex SignalListMutex;
ErrorReportingChangedHandler errorReportingChangedHandler;
bool initSignal() bool initSignal()
{ {
SignalListMutex = osl_createMutex(); SignalListMutex = osl_createMutex();
...@@ -51,11 +49,6 @@ bool deInitSignal() ...@@ -51,11 +49,6 @@ bool deInitSignal()
} }
void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler)
{
errorReportingChangedHandler = handler;
}
oslSignalAction callSignalHandler(oslSignalInfo* pInfo) oslSignalAction callSignalHandler(oslSignalInfo* pInfo)
{ {
oslSignalHandlerImpl* pHandler = SignalList; oslSignalHandlerImpl* pHandler = SignalList;
...@@ -167,10 +160,7 @@ sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable ) ...@@ -167,10 +160,7 @@ sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
{ {
bool bOld = bErrorReportingEnabled; bool bOld = bErrorReportingEnabled;
bErrorReportingEnabled = bEnable; bErrorReportingEnabled = bEnable;
onErrorReportingChanged(bEnable);
if (errorReportingChangedHandler)
errorReportingChangedHandler(bEnable);
return bOld; return bOld;
} }
......
...@@ -281,6 +281,8 @@ bool onDeInitSignal() ...@@ -281,6 +281,8 @@ bool onDeInitSignal()
return false; return false;
} }
void onErrorReportingChanged(SAL_UNUSED_PARAMETER bool) {}
namespace namespace
{ {
void printStack(int sig) void printStack(int sig)
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
namespace namespace
{ {
long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP); long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP);
void onErrorReportingChanged(bool bEnable);
} }
bool onInitSignal() bool onInitSignal()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment