mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 10:19:30 +02:00
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:
parent
41a48fe385
commit
14f9774838
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user