Browse Source

AROS: Ensure that spinlocks for SMP enabled build can only be active for ABIv1

These changes makes sure that the use of record structure TSpinlock can only
be enabled/active for AROS ABIv1 as that ABI is currently the only ABI that
is able to support SMP by using the spinlock record structure.
magorium 3 years ago
parent
commit
14f9774838
2 changed files with 12 additions and 0 deletions
  1. 6 0
      packages/arosunits/src/exec.pas
  2. 6 0
      rtl/aros/i386/execd.inc

+ 6 - 0
packages/arosunits/src/exec.pas

@@ -86,6 +86,7 @@ const
   LFalse: LongInt = 0;
 
 // spinlock
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 type
   TSpinLock =
@@ -106,6 +107,7 @@ type
     3: (pad_align: packed array[0..128-1] of byte);            // ensure 128 byte record size
   end;
 {$endif}
+{$endif}
 
 type
 // List Node Structure.  Each member in a list starts with a Node
@@ -638,12 +640,14 @@ type
     mp_SigBit: Byte;     { signal bit number    }
     mp_SigTask: Pointer;   { task to be signalled (TaskPtr) }
     mp_MsgList: TList;     { message linked list  }
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 {$ifdef AROSEXEC_SMP}
     mp_SpinLock: TSpinLock;
 {$else}
     mp_Pad: TSpinlock;
 {$endif}
+{$endif}
 {$endif}
   end;
 
@@ -868,12 +872,14 @@ type
   TSemaphoreRequest = record
     sr_Link: TMinNode;
     sr_Waiter: PTask;
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 {$ifdef AROSEXEC_SMP}
     sr_SpinLock: TSpinLock;
 {$else}
     sr_pad: TSpinLock;
 {$endif}
+{$endif}
 {$endif}
   end;
 

+ 6 - 0
rtl/aros/i386/execd.inc

@@ -29,6 +29,7 @@
   * }
 
 
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 type
   TSpinLock =
@@ -49,6 +50,7 @@ type
     3: (pad_align: packed array[0..128-1] of byte);            // ensure 128 byte record size
   end;
 {$endif}
+{$endif}
 
 
 
@@ -604,12 +606,14 @@ type  // Checked OK 05.08.2011 ALB
     mp_SigBit : Byte;
     mp_SigTask: Pointer;
     mp_MsgList: TEList;
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 {$ifdef AROSEXEC_SMP}
     mp_SpinLock: TSpinLock;
 {$else}
     mp_pad: TSpinLock;
 {$endif}
+{$endif}
 {$endif}
   end;
 
@@ -1100,12 +1104,14 @@ type
   TSemaphoreRequest = record
     sr_Link  : TMinNode;
     sr_Waiter: PTask;
+{$ifdef AROS_ABIv1}
 {$ifdef AROSPLATFORM_SMP}
 {$ifdef AROSEXEC_SMP}
     sr_SpinLock: TSpinLock;
 {$else}
     sr_pad: TSpinLock;
 {$endif}
+{$endif}
 {$endif}
   end;