Previous: , Up: GNAT Implementation of Tasking   [Contents][Index]

15.2.3 Support for Locking Policies

This section specifies which policies specified by pragma Locking_Policy are supported on which platforms.

GNAT supports the standard Ceiling_Locking policy, and the implementation defined Inheritance_Locking and Concurrent_Readers_Locking policies.

Ceiling_Locking is supported on all platforms if the operating system supports it. In particular, Ceiling_Locking is not supported on VxWorks. Inheritance_Locking is supported on Linux, Darwin (Mac OS X), LynxOS 178, and VxWorks. Concurrent_Readers_Locking is supported on Linux.

Notes about Ceiling_Locking on Linux: If the process is running as ’root’, ceiling locking is used. If the capabilities facility is installed ("sudo apt-get –assume-yes install libcap-dev" on Ubuntu, for example), and the program is linked against that library ("-largs -lcap"), and the executable file has the cap_sys_nice capability ("sudo /sbin/setcap cap_sys_nice=ep executable_file_name"), then ceiling locking is used. Otherwise, the Ceiling_Locking policy is ignored.