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,283a7b1811f3f2ad,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!q2g2000cwa.googlegroups.com!not-for-mail From: laforge2001@gmail.com Newsgroups: comp.lang.ada Subject: pragma importing sem_init gives me a segmentation fault Date: 24 Feb 2007 12:52:50 -0800 Organization: http://groups.google.com Message-ID: <1172350370.771564.253920@q2g2000cwa.googlegroups.com> NNTP-Posting-Host: 130.76.96.14 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1172350384 22890 127.0.0.1 (24 Feb 2007 20:53:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 24 Feb 2007 20:53:04 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 (CK-zz) Firefox/1.5.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q2g2000cwa.googlegroups.com; posting-host=130.76.96.14; posting-account=qw7DyQ0AAAB5_UUCkt_OnqhAcswXmJWG Xref: g2news2.google.com comp.lang.ada:9506 Date: 2007-02-24T12:52:50-08:00 List-Id: Hi, I'm an ADA noob so please be gentle :) Anyways, I am trying to use POSIX semaphores by pragma importing sem_init, sem_post, sem_wait, etc. and it seems everytime I hit sem_init, the program seg faults. Has anyone ever tried doing this before with any success ? These semaphores are in shared memory and I believe I'm allocating the same space in memory as a sem_t type. We are actually trying to convert from an SGI platform to a Linux based platform, so all the previous semaphore calls were SGI specific and we were looking to move to POSIX based semaphores. Does anyone have any ideas how to go about this ? Thanks, Eric