It would be very nice to be able to define a type which will be used to instance locked variable:
I have complex structures existing in runtime records accessed by different processes, and there are for example commands similar to this one:
It would really be nice to be able to lock such variables nested in typed records. Without such a feature I have to give up either locking or typed records, or write ugly disable/enable interrupt workaround wrapper for each variable access.
Code
type
TRawNum = integer, locked; // <<<<< NOT POSSIBLE :-(
TAiRuntime = record
Eng: TSomeNotImportantType;
Raw: TRawNum; // <<<<< NOT POSSIBLE :-(
end;
var
LockedVar: integer, locked; // <<<<< POSSIBLE :-)
AI: array[1..64] of TAiRuntime; // <<<<< NOT POSSIBLE :-(
TRawNum = integer, locked; // <<<<< NOT POSSIBLE :-(
TAiRuntime = record
Eng: TSomeNotImportantType;
Raw: TRawNum; // <<<<< NOT POSSIBLE :-(
end;
var
LockedVar: integer, locked; // <<<<< POSSIBLE :-)
AI: array[1..64] of TAiRuntime; // <<<<< NOT POSSIBLE :-(
I have complex structures existing in runtime records accessed by different processes, and there are for example commands similar to this one:
Code
Runtime.AI[4].Raw.Value := SomeValue;
It would really be nice to be able to lock such variables nested in typed records. Without such a feature I have to give up either locking or typed records, or write ugly disable/enable interrupt workaround wrapper for each variable access.