AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Thread's & Signals?

Ein Thema von Mavarik · begonnen am 14. Mai 2013 · letzter Beitrag vom 27. Jun 2013
 
Benutzerbild von Mavarik
Mavarik

Registriert seit: 9. Feb 2006
Ort: Stolberg (Rhld)
4.154 Beiträge
 
Delphi 10.3 Rio
 
#9

AW: Thread's & Signals?

  Alt 20. Mai 2013, 22:59
...und lößt eine manuelle Exception aus!
... Was ist denn eine 'manuelle Exception'?
Delphi-Quellcode:
procedure SignalConverter(ExceptionEIP: LongWord; FaultAddr: LongWord; ErrorCode: LongWord);
{$IFDEF CPUARM}
begin
  raise GetExceptionObject(ExceptionEIP, FaultAddr, ErrorCode) at Pointer(ExceptionEIP);
end;
{$ENDIF CPUARM}
{
RaiseSignalException is called from SignalConverter, once we've made things look
like there's a legitimate stack frame above us. Now we will just create
an exception object, and raise it via a software raise.
}
procedure RaiseSignalException(ExceptionEIP: LongWord; FaultAddr: LongWord; ErrorCode: LongWord);
begin
raise GetExceptionObject(ExceptionEIP, FaultAddr, ErrorCode);
end;

{
SignalConverter is where we come when a signal is raised that we want to convert
to an exception. This function stands the best chance of being called with a
useable stack frame behind it for the purpose of stack unwinding. We can't
guarantee that, though. The stack was modified by the baseline signal handler
to make it look as though we were called by the faulting instruction. That way
the unwinder stands a chance of being able to clean things up.
}

Delphi-Quellcode:
var
  E : TEvent;
begin
  E.SetEvent;
  // call dispatch_semaphore_signal(FEvent);
Mavarik
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz