comp.lang.ada
 help / color / mirror / Atom feed
* Deafult GNAT Locking_Policy
@ 2019-09-10 10:00 sbelmont700
  2019-09-10 10:06 ` AdaMagica
  2019-09-10 10:54 ` Egil H H
  0 siblings, 2 replies; 4+ messages in thread
From: sbelmont700 @ 2019-09-10 10:00 UTC (permalink / raw)



D.3~6/2 says "If no Locking_Policy pragma applies to any of the program units comprising a partition, the locking policy for that partition, as well as the meaning of the priority of a protected object, are implementation defined."  But I can't find anything anywhere in any of the GNAT documents, native or cross, that says what that default is.  There's this bit:

"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."

Should I understand this as meaning Inheritance_Locking as GNAT's default locking policy?  It guess it would have to be on VxWorks, but Linux could be any of the three.  Is there some other paragraph buried somewhere that I missed?

-sb


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Deafult GNAT Locking_Policy
  2019-09-10 10:00 Deafult GNAT Locking_Policy sbelmont700
@ 2019-09-10 10:06 ` AdaMagica
  2019-09-10 10:54 ` Egil H H
  1 sibling, 0 replies; 4+ messages in thread
From: AdaMagica @ 2019-09-10 10:06 UTC (permalink / raw)


In RM.M documentation requirements are listed, esp. M.2(98.1/2). There should be a GNAT document with answers to all these requiremnts.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Deafult GNAT Locking_Policy
  2019-09-10 10:00 Deafult GNAT Locking_Policy sbelmont700
  2019-09-10 10:06 ` AdaMagica
@ 2019-09-10 10:54 ` Egil H H
  2019-09-10 12:11   ` sbelmont700
  1 sibling, 1 reply; 4+ messages in thread
From: Egil H H @ 2019-09-10 10:54 UTC (permalink / raw)


On Tuesday, September 10, 2019 at 12:00:22 PM UTC+2, sbelm...@gmail.com wrote:
> D.3~6/2 says "If no Locking_Policy pragma applies to any of the program units comprising a partition, the locking policy for that partition, as well as the meaning of the priority of a protected object, are implementation defined."  But I can't find anything anywhere in any of the GNAT documents, native or cross, that says what that default is.  There's this bit:
> 

The GNAT documentation is split into two main documents, the GNAT User's Guide, and the GNAT RM. You should find what you're looking for in the Implementation Defined Characteristics chapter of the GNAT RM.

-- 
~egilhh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Deafult GNAT Locking_Policy
  2019-09-10 10:54 ` Egil H H
@ 2019-09-10 12:11   ` sbelmont700
  0 siblings, 0 replies; 4+ messages in thread
From: sbelmont700 @ 2019-09-10 12:11 UTC (permalink / raw)


Indeed their should be, but part 7 (Implementation Defined Characteristics) is also silent.  One would expect something for paragraph D.3(6/2), yet this is apparently the extent:

•“Implementation-defined policy_identifiers allowed in a pragma Locking_Policy. See D.3(4).”

The two implementation defined policies permitted in GNAT are Inheritance_Locking and Concurrent_Readers_Locking. On targets that support the Inheritance_Locking policy, locking is implemented by inheritance, i.e., the task owning the lock operates at a priority equal to the highest priority of any task currently requesting the lock. On targets that support the Concurrent_Readers_Locking policy, locking is implemented with a read/write lock allowing multiple protected object functions to enter concurrently.

•“Default ceiling priorities. See D.3(10).”

The ceiling priority of protected objects of the type System.Interrupt_Priority'Last as described in the Ada Reference Manual D.3(10),

•“The ceiling of any protected object used internally by the implementation. See D.3(16).”

The ceiling priority of internal protected objects is System.Priority'Last.


Was there a part I was missing?

-sb

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-10 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 10:00 Deafult GNAT Locking_Policy sbelmont700
2019-09-10 10:06 ` AdaMagica
2019-09-10 10:54 ` Egil H H
2019-09-10 12:11   ` sbelmont700

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox