Thema: iOS Thread's & Signals?

Einzelnen Beitrag anzeigen

Benutzerbild von Mavarik
Mavarik

Registriert seit: 9. Feb 2006
Ort: Stolberg (Rhld)
4.130 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