Next: Time and Clocks
Up: Protected Objects
Previous: GNAT Implementation
In this chapter we have briefly presented the GNAT implementation of
the protected objects. The main concepts are:
- There are two models to implement the protected
objects: the self-service and the proxy model. GNAT uses the
- There are also two possibilities to implement the proxy model:
the in-line and the call-back implementation. Although the
in-line implementation was used in the initial versions,
nowadays GNAT has adopted the Call-back
- Protected subprograms are translated to two subprograms ( and ).
P is responsible to take the object lock and N has the user
- Barriers are translated to functions that return
a Boolean data type.
- Entry bodies are translated to procedures.
(c) Javier Miranda. Canary Islands (Spain), 2002. Version 1.0