* Gnat and non thread-safe C libraries
@ 1999-01-22 0:00 Laurent Deniel
0 siblings, 0 replies; only message in thread
From: Laurent Deniel @ 1999-01-22 0:00 UTC (permalink / raw)
To: Pascal MALAISE
Hi all
I am trying to migrate an Ada program to the Linux/gnat environment.
The program makes use of the X library and of other non thread-safe
C libraries. As gnat may internally use threads even if this program
does not contain Ada tasks, I encounter some random weird behaviors
depending on the thread library:
With the default one (FSU), the signal handling in one library is
broken since some signals (SIGIO, SIGURG) are received (and the
associated handlers are executed) in some runtime thread context
while the user thread has blocked that signals (the library expects
that such signals are blocked at process level). I tried to use the
Block_Interrupt procedure but without success (segmentation violation).
With the native one (Linux kernel Threads), the signal handling is
compatible with all libraries but the errno value is incorrect in
those that were not compiled with the flag _REENTRANT (like X lib).
So a little question: is it possible to avoid thread usage in the
gnat runtime when a program does not make use of the Ada tasking ?
Any other advises would be greatly appreciated ...
Laurent.
--
Laurent DENIEL | E-mail: deniel@worldnet.fr
Paris, FRANCE | deniel@fr.airsysatm.thomson-csf.com
| WWW : http://www.worldnet.fr/~deniel
All above opinions are personal, unless stated otherwise.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-01-22 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-22 0:00 Gnat and non thread-safe C libraries Laurent Deniel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox