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.
This commit is contained in:
magorium 2022-05-12 23:21:17 +02:00 committed by Charlie Balogh
parent 41a48fe385
commit 14f9774838
2 changed files with 12 additions and 0 deletions

View File

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

View File

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