|
@@ -23,6 +23,35 @@
|
|
{$include utild1.inc}
|
|
{$include utild1.inc}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+{ * aros spinlock definition
|
|
|
|
+ *********************************************************************
|
|
|
|
+ * }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+{$ifdef AROSPLATFORM_SMP}
|
|
|
|
+type
|
|
|
|
+ TSpinLock =
|
|
|
|
+ record
|
|
|
|
+ case byte of
|
|
|
|
+ 0: (slock:
|
|
|
|
+ bitpacked record // ensure bits are packed. this is a volatile structure
|
|
|
|
+ readcount: 0..$FFFFFF;
|
|
|
|
+ _pad2: 0..$7;
|
|
|
|
+ &write: 0..$1;
|
|
|
|
+ _pad1: 0..$7;
|
|
|
|
+ updating: 0..$1;
|
|
|
|
+ end);
|
|
|
|
+ 1: (block: packed array[0..3] of byte; lock: uint32); // both fields are volatile
|
|
|
|
+ // The field s_Owner is set either to task owning the lock,
|
|
|
|
+ // or NULL if the lock is free/read mode or was acquired in interrupt/supervisor mode
|
|
|
|
+ 2: (_skip: packed array[0..7] of byte; s_Owner: Pointer); // skip block and lock because that occupies most space
|
|
|
|
+ 3: (pad_align: packed array[0..128-1] of byte); // ensure 128 byte record size
|
|
|
|
+ end;
|
|
|
|
+{$endif}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
{ * exec node definitions
|
|
{ * exec node definitions
|
|
*********************************************************************
|
|
*********************************************************************
|
|
* }
|
|
* }
|