* Calling ada code from non Ada threads
@ 2005-10-10 7:32 andy_starritt
2005-10-10 14:08 ` Marc A. Criley
2005-10-10 20:38 ` Simon Wright
0 siblings, 2 replies; 3+ messages in thread
From: andy_starritt @ 2005-10-10 7:32 UTC (permalink / raw)
Hi all,
I'm writing a binding to a shared library written in c. Part
of the API specification allows for a call back procedure
to called later when some event occurs.
The call back is in a thread created by the shared library,
and this causes a segmentation fault if I try to do anything
'significant' in the Ada code (even a simple Ada.Text_IO.Put_Line is
problematic). If I just copy the
call back procedure parameter data to a package
level variable all is okay.
Is there any way to let the Ada know and/or be 'happy' with code
being invoked in a non Ada thread?
BtW using Linux Red Hat 9 and RH Enterprise 3.0
Cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Calling ada code from non Ada threads
2005-10-10 7:32 Calling ada code from non Ada threads andy_starritt
@ 2005-10-10 14:08 ` Marc A. Criley
2005-10-10 20:38 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Marc A. Criley @ 2005-10-10 14:08 UTC (permalink / raw)
andy_starritt@hotmail.com wrote:
> The call back is in a thread created by the shared library,
> and this causes a segmentation fault if I try to do anything
> 'significant' in the Ada code (even a simple Ada.Text_IO.Put_Line is
> problematic). If I just copy the
> call back procedure parameter data to a package
> level variable all is okay.
>
> Is there any way to let the Ada know and/or be 'happy' with code
> being invoked in a non Ada thread?
>
> BtW using Linux Red Hat 9 and RH Enterprise 3.0
What compiler are you using? Gnat 3.15p? If you are, are you aware of
the tasking problem interacting with threads on RH 9? I know you're
working with "threads", but perhaps it's related?
See http://www.mckae.com/dtq_common/README.RedHat9 for more info.
-- Marc A. Criley
-- McKae Technologies
-- www.mckae.com
-- DTraq - XPath In Ada - XML EZ Out
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Calling ada code from non Ada threads
2005-10-10 7:32 Calling ada code from non Ada threads andy_starritt
2005-10-10 14:08 ` Marc A. Criley
@ 2005-10-10 20:38 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Simon Wright @ 2005-10-10 20:38 UTC (permalink / raw)
andy_starritt@hotmail.com writes:
> Is there any way to let the Ada know and/or be 'happy' with code
> being invoked in a non Ada thread?
Check out GNAT.Threads.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-10 20:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-10 7:32 Calling ada code from non Ada threads andy_starritt
2005-10-10 14:08 ` Marc A. Criley
2005-10-10 20:38 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox