Lockable Dynamic Areas
Select 1 introduced a number of new dynamic area calls for preventing areas from being resized without the owner's knowledge. Many dynamic areas should not be changed without the consent of the creator. Although it is not likely that malicious applications will resize the areas created by others this may happen accidentally. Locked dynamic areas allow the creator to prevent changes from being made to the areas.
OS_DynamicArea 11 (Lock area)
On entry
R0 = 11 (reason code)
R1 = area number to lock
R2 = 32bit code number to lock with
On exit
all registers preserved
This SWI is used to lock the dynamic area. Once locked, the area cannot be resized or deleted. To unlock the area, the OS_DynamicArea 12 call must be made, supplying the same 32bit code number which was used to lock the area. System dynamic areas cannot be locked. A locked dynamic area cannot be re-locked.
OS_DynamicArea 12 (Unlock area)
On entry
R0 = 11 (reason code)
R1 = area number to unlock
R2 = 32bit code number used to lock area
On exit
all registers preserved
This SWI is used to unlock the dynamic area. Once unlocked, the area can be resized or deleted as normal. No error will occur if the area was already unlocked.
|