Lockable Dynamic Areas

Introduction and Overview

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.

SWI Calls

OS_DynamicArea BOS_DynamicArea_LockSWI &66
Lock a dynamic area
R0=11 (reason code)
R1=Area number to lock
R2=32bit code number to lock with
R0 - R2=Preserved
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
Not defined

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 COS_DynamicArea_UnlockSWI &66
Unlock a dynamic area
R0=12 (reason code)
R1=Area number to unlock
R2=32bit code number used to lock area
R0 - R2=Preserved
Interrupts are undefined
Fast interrupts are undefined
Processor is in undefined mode
Not defined

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.