Application Programming Interface

The application programming interface is now what is termed "storage key sensitive". This means that the API routines determine the key of the storage to which they are going to write and switch their PSW key to that key prior to writing to the storage. This avoids the overhead of changing the entire thread to Com-plete's key during an API call and back again once the call has been processed. It also means that the path length through an API routine is exactly the same if the thread is defined with Com-plete's storage protect key or a different protect key i.e. using the storage protection feature should be no more expensive for most applications.

Note that some emulated operating system SVCs cause the key of the thread to be changed due to internal operating system requirements. For this reason, operating system specific functions should be avoided whenever possible and the appropriate Com-plete API function used instead.

Due to the requirement to support SVC entry to the nucleus, there is a slight additional overhead required in the thread. This is primarily an 18F savearea which is used by the internal bridging mechanism to enter the standard API routines. Where COLINK, or OS type link requests are used, an additional 18F savearea is acquired per link request which is freed on return from the link.