From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,60c63f7a79fb7c92,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: andy_starritt@hotmail.com Newsgroups: comp.lang.ada Subject: Calling ada code from non Ada threads Date: 10 Oct 2005 00:32:11 -0700 Organization: http://groups.google.com Message-ID: <1128929531.815574.275060@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 212.147.51.229 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1128929537 12363 127.0.0.1 (10 Oct 2005 07:32:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 10 Oct 2005 07:32:17 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=212.147.51.229; posting-account=T7MseQ0AAACQcLy45nSQE3rt20DXGAui Xref: g2news1.google.com comp.lang.ada:5532 Date: 2005-10-10T00:32:11-07:00 List-Id: 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