comp.lang.ada
 help / color / mirror / Atom feed
* protected object with no private part
@ 2010-12-07 11:10 David Shochat
  2010-12-07 19:12 ` Jeffrey Carter
  0 siblings, 1 reply; 2+ messages in thread
From: David Shochat @ 2010-12-07 11:10 UTC (permalink / raw)


This is for Ada 95. I have a shared object that declares two protected 
procedures and nothing else. There is nothing in the private part (the 
shared entity I'm trying to control access to is shared memory accessed 
using a non-Ada interface). Can I assume that while one of my tasks is 
executing one of the procedures, it is not possible for another task to 
execute the other? The reason for using OS shared memory is that there is 
another (single-threaded) /process/ that also has to access it. This is 
Rational/IBM Apex with Ada tasks mapped to threads (HP-UX). There is 
locking in use to assure that only one process accesses the shared memory 
at a time.



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

* Re: protected object with no private part
  2010-12-07 11:10 protected object with no private part David Shochat
@ 2010-12-07 19:12 ` Jeffrey Carter
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Carter @ 2010-12-07 19:12 UTC (permalink / raw)


On 12/07/2010 04:10 AM, David Shochat wrote:
> This is for Ada 95. I have a shared object that declares two protected
> procedures and nothing else. There is nothing in the private part (the
> shared entity I'm trying to control access to is shared memory accessed
> using a non-Ada interface). Can I assume that while one of my tasks is
> executing one of the procedures, it is not possible for another task to
> execute the other?

Yes. Protected procedures are mutually exclusive.

-- 
Jeff Carter
"No one is to stone anyone until I blow this whistle,
do you understand? Even--and I want to make this
absolutely clear--even if they do say, 'Jehovah.'"
Monty Python's Life of Brian
74



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

end of thread, other threads:[~2010-12-07 19:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-07 11:10 protected object with no private part David Shochat
2010-12-07 19:12 ` Jeffrey Carter

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