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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a5f6199c3cc0e8b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.43.117.133 with SMTP id fm5mr12933741icc.7.1320337054420; Thu, 03 Nov 2011 09:17:34 -0700 (PDT) Path: p6ni66964pbn.0!nntp.google.com!news2.google.com!postnews.google.com!n38g2000yqm.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Calling Ada from C (linux/gnat 4.3.2) Date: Thu, 3 Nov 2011 09:17:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1d620e6c-4b03-40f0-aa8e-486a7a02fb23@n38g2000yqm.googlegroups.com> References: <8ba649f0-7ca1-4f05-a158-74b074e401ee@o19g2000vbk.googlegroups.com> <82ehxqmrvx.fsf@stephe-leake.org> NNTP-Posting-Host: 192.31.106.34 Mime-Version: 1.0 X-Trace: posting.google.com 1320337054 21779 127.0.0.1 (3 Nov 2011 16:17:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Nov 2011 16:17:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n38g2000yqm.googlegroups.com; posting-host=192.31.106.34; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Xref: news2.google.com comp.lang.ada:14292 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-03T09:17:34-07:00 List-Id: Thanks for the suggestions Jeff - yes, I'm calling adainit/final - the Ada code is executing when I remove the -fstack-check, its just running rampant through memory and the threads are clobbering each other. Simon - Thanks, the GNAT.Threads.Register_Thread sounds promising - I'm wondering if it may be the equivalent of the rts_init_task() call. Stephen - believe me, I'd rather do that, but I'm limited in my options for which parts of the program I can modify. I haven't had a chance to try out Simon's suggestion yet. I had problem with the Linux server that had me spending all day reinstalling the OS... Will follow up once I get things reconfigured.