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,FREEMAIL_FROM,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a86a40264bdf0146,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 03 Sep 2007 10:49:42 -0500 From: "Steve" Newsgroups: comp.lang.ada Subject: Anyone have an IA-32 locked instruction library for GNAT? Date: Mon, 3 Sep 2007 08:51:43 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-RFC2646: Format=Flowed; Original Message-ID: <7Kudnd0MZvyLsEHbnZ2dnUVZ_u6rnZ2d@comcast.com> X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.20.111.206 X-Trace: sv3-JBDRYDEOxvECskbgdRRL+iE4s6uLGr2NEO+P/5Yss/nwVh/fh2iN27NIV5p9T6MEf5bMYLM4ahfqg5i!KuRyjJJBtvQLQZMBXBagrpwx02EIwxrUEm2/wazKU2au7KmI1+sKqc5zZtdr4rBab0XLspFnCWFN!dRmajPvSeqgsNTmGKpxHlbY0oyMZIA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news2.google.com comp.lang.ada:1700 Date: 2007-09-03T08:51:43-07:00 List-Id: The IA-32 processors (and derivatives) support locked forms of the instructions: ADD, ADC, AND, BTC, BTR, BTS, CMPXCHG, CMPXCH8B, DEC, INC, NEG, NOT, OR, SBB, SUB, XOR, XADD, and XCHG. According to Intels' documentation, "In a multiprocessor environment, the LOCK# signal insures that the processor has exclusive use of any shared memory while the signal is asserted." By any chance has anyone implemented the inline assembly functions for GNAT to make these functions available on IA-32 systems? The same library shuld work on Linux and Windows. With the new multi-core processors these instructions can be useful for very low overhead task safe access to shared resources. Regards, Steve (The Duck)