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,9277635655f37412 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.209.68 with SMTP id mk4mr22234227pbc.6.1323087938518; Mon, 05 Dec 2011 04:25:38 -0800 (PST) Path: lh20ni71943pbb.0!nntp.google.com!news1.google.com!postnews.google.com!d17g2000yql.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: POSIX.Semaphores question Date: Mon, 5 Dec 2011 04:25:38 -0800 (PST) Organization: http://groups.google.com Message-ID: <2166814f-4a26-4425-965f-2c6215eeedde@d17g2000yql.googlegroups.com> References: <9jvdbkFdi2U1@mid.individual.net> NNTP-Posting-Host: 192.31.106.34 Mime-Version: 1.0 X-Trace: posting.google.com 1323087938 15202 127.0.0.1 (5 Dec 2011 12:25:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 5 Dec 2011 12:25:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d17g2000yql.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:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Xref: news1.google.com comp.lang.ada:19346 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-05T04:25:38-08:00 List-Id: On Dec 3, 2:59=A0pm, Niklas Holsti wrote: > > This pragma gives the variable a very short linkage name, "ready", which > is moreover a common word. Perhaps the same name is used by some other > module of the program, for some other program item, and this confuses > the linker. Does the linker give any errors or warnings? > > Try it with a longer name, one less likely to be in use already for > something else. > I simplified the example code that I posted - the actual name I'm using is much longer. (Sem_R_RTSIM_SHM_READY, R_RTSIM_SHM_READY and r_rtsim_shm_ready) I see no warnings or errors during the compile or link. I am linking the Ada files into a library which is compiled into a C main. The only thing I do see, is when I add the compile flat to print out the rep specs - the Semaphore is given two different sizes... for SEM_R_RTSIM_SHM_READY'Size use 128; for SEM_R_RTSIM_SHM_READY'Size use 192; It should be 128, not sure why its later showing as 192... from looking at the definition for sem_t on this linux system, it should be 128.