source: MicroThreading/Patch/FPC 2.5.3.patch

Last change on this file was 225, checked in by george, 14 years ago
  • Patch file for FPC 2.4.2.
File size: 2.0 KB
  • rtl/inc/except.inc

     
    2626  cFinalizeFrame  = 2;
    2727
    2828Type
    29   PExceptAddr = ^TExceptAddr;
    30   TExceptAddr = record
    31     buf       : pjmp_buf;
    32     next      : PExceptAddr;
    33     frametype : Longint;
    34   end;
    3529
    3630  TExceptObjectClass = Class of TObject;
    3731
     
    4842end;
    4943
    5044
     45// Used for microthreading context switching
     46
     47Function GetExceptionAddrStack : PExceptAddr;
     48begin
     49  Result := ExceptAddrStack;
     50end;
     51
     52Function GetExceptionObjectStack : PExceptObject;
     53begin
     54  Result := ExceptObjectStack;
     55end;
     56
     57procedure SetExceptionAddrStack(Value : PExceptAddr);
     58begin
     59  ExceptAddrStack := Value;
     60end;
     61
     62procedure SetExceptionObjectStack(Value : PExceptObject);
     63begin
     64  ExceptObjectStack := Value;
     65end;
     66
     67
    5168function AcquireExceptionObject: Pointer;
    5269var
    5370  _ExceptObjectStack : PExceptObject;
  • rtl/inc/objpash.inc

     
    333333         Framecount : Longint;
    334334         Frames     : PPointer;
    335335       end;
     336       
     337       PExceptAddr = ^TExceptAddr;
     338       TExceptAddr = record
     339         buf       : pjmp_buf;
     340         next      : PExceptAddr;
     341         frametype : Longint;
     342       end;
    336343
    337344    Const
    338345       ExceptProc : TExceptProc = Nil;
     
    341348
    342349    Function RaiseList : PExceptObject;
    343350
     351    // Used for microthreading context switching
     352    Function GetExceptionAddrStack : PExceptAddr;
     353    Function GetExceptionObjectStack : PExceptObject;
     354    procedure SetExceptionAddrStack(Value : PExceptAddr);
     355    procedure SetExceptionObjectStack(Value : PExceptObject);
     356
    344357    { @abstract(increase exception reference count)
    345358      When leaving an except block, the exception object is normally
    346359      freed automatically. To avoid this, call this function.
Note: See TracBrowser for help on using the repository browser.