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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4590cbe206fc9bb9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.237.155 with SMTP id y27mr180833weq.11.1347644472170; Fri, 14 Sep 2012 10:41:12 -0700 (PDT) Path: q11ni64815075wiw.1!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Stumped: Seg Fault with System.Secondary_Stack.SS_Mark() Date: Fri, 07 Sep 2012 18:07:35 +0100 Organization: A noiseless patient Spider Message-ID: References: <6dfcb108-01de-42e4-962a-87a9ac91741c@googlegroups.com> <87fw6u2abw.fsf@ludovic-brenta.org> <016ff78a-64f9-4a42-a079-e544526e2f8a@googlegroups.com> <87bohi26kl.fsf@ludovic-brenta.org> <0b591914-1915-4c8b-b0d5-ebf188fc2de4@googlegroups.com> <00367705-1c58-4ae1-9965-c6415feae8c3@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="a9272c9c584810f74e3f95ce46cbeceb"; logging-data="3383"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JIV5iNArpP/2c+OGIDgZavHhUYe+TiQ8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:OaFxEahoUR7qDsnRWAEBqsszB9Y= sha1:pkna70D6PNw7076qGsQZ2bppvTI= Content-Type: text/plain Date: 2012-09-07T18:07:35+01:00 List-Id: awdorrin writes: > After looking at the g-thread.ads file on my system, I'm thinking that > perhaps I need to change the thread function to something like: > > extern void *__gnat_register_thread(); > > int rtctl_rts() { > void *task_id = __gnat_register_thread(); > e_mainline(); > __gnat_unregister_thread(); > return 0; > } That's what I was thinking (when I came across this problem, the Ada code was a callback from a VxWorks task, so not the same scenario exactly).