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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d05ccde5cefb836 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Tasks and C/C++ code. Date: 1998/11/11 Message-ID: <72cppi$77u$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 410793773 References: <364702E5.F6987321@hiwaay.net> <729ndu$jfo$1@nnrp1.dejanews.com> <72b35b$pll$1@nnrp1.dejanews.com> <3649A4C4.4D3D22A2@hiwaay.net> X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Nov 11 19:50:10 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I) Date: 1998-11-11T00:00:00+00:00 List-Id: In article <3649A4C4.4D3D22A2@hiwaay.net>, bdorough@phaseiv.com wrote: > So, if I understand correctly defining the pragma to C in the declaration part of > the task body will give me multiple binding to the same function if there are > multiple tasks? If there are multiple tasks of that type, or if there are multiple tasks with "pragma Import"s using the same "External_Name" value, yes. > If this is correct what happens when you write an Ada procedure/function in a > task? Does each task get it own copy? I hope the answer is yes or I have > completely misunderstood the Ada tasking model! Yes again. If the body of a subprogram is physically *in* the task's body, then every task gets its own copy of that subprogram (along with all the other objects it declares). However, the body for the "pragma Import" is really in an object file which was declared (in C) at the top scope level. In this sense, its much like doing a "renames" clause on a library unit. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own