comp.lang.ada
 help / color / mirror / Atom feed
* Help:Ada95:ProtectedType:StackSize
@ 1998-01-12  0:00 Michael Davies
  1998-01-12  0:00 ` Help:Ada95:ProtectedType:StackSize Samuel Tardieu
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Davies @ 1998-01-12  0:00 UTC (permalink / raw)




Could someone please help?  I'm using Ada95 with the (latest GA) Rational
complier on Solaris 2.X, trying to set the stack size for a protected type.
 Why?  I'm receiving a storage_error exception during runtime (during a
static var declaration).

I've tried, "for prot_type'storage_size use 100000" after the protected
type definition, as well as "pragma storage_size(100000)" inside the
declaration.  Both to no avail.  ie.  these techniques not valid for
protected types.  Any ideas?  The LRM and Barnes have both been little help
(although I guess the LRM has the answer - just can't find it :-(

If you can help, please _email_ the solution to mikey@iagu.net

Thanks in advance,

Michael...






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

* Re: Help:Ada95:ProtectedType:StackSize
  1998-01-12  0:00 Help:Ada95:ProtectedType:StackSize Michael Davies
@ 1998-01-12  0:00 ` Samuel Tardieu
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Tardieu @ 1998-01-12  0:00 UTC (permalink / raw)
  To: Michael Davies


>>>>> "Michael" == Michael Davies <mikey@iagu.net> writes:

Michael> Could someone please help?  I'm using Ada95 with the (latest
Michael> GA) Rational complier on Solaris 2.X, trying to set the stack
Michael> size for a protected type.

What do you mean by "trying to set the stack size for a protected
type"? You can't set the stack size for a subprogram, why would you
want to be able to set it for a protected object[1]?

The caller stack will be used when executing a protected operation. If 
a specific stack was used for the protected object, then simultaneous
protected function calls would use the same stack! That's why you have 
one stack by thread of control.

Michael> Why?  I'm receiving a storage_error exception during runtime
Michael> (during a static var declaration).

You should increase the stack size of the tasks calling the protected
operations.

  Sam

Footnotes: 
[1]  Except in the case of interrupt handlers which is probably not
     the case here
-- 
Samuel Tardieu -- sam@ada.eu.org




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

end of thread, other threads:[~1998-01-12  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-12  0:00 Help:Ada95:ProtectedType:StackSize Michael Davies
1998-01-12  0:00 ` Help:Ada95:ProtectedType:StackSize Samuel Tardieu

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