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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: pragma Thread_Local_Storage on record? Date: Tue, 1 Mar 2016 16:52:11 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 1 Mar 2016 15:49:12 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="45bffd6a911624777cad79aac3181090"; logging-data="21227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aPPjWfM0eRN4bVoXUwus0" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: Cancel-Lock: sha1:URgrb3gU0AUn8NIgGPmWxjb83xc= Xref: news.eternal-september.org comp.lang.ada:29635 Date: 2016-03-01T16:52:11+01:00 List-Id: Le 01/03/2016 14:45, hanslad@gmail.com a écrit : > I am trying to use the pragma Thread_Local_Storage on a record as follows: Hmmm... Gnat's RM is not crystal clear, but it says: "The variable may not have default initialization, and if there is an explicit initialization, it must be either null for an access variable, or a static expression for a scalar variable." This seems to indicate that the variable should be access or scalar only, so not a record. However, why do you need this non-portable, system-dependent, feature? Apparently, this is intended only to allow managing foreign (non-Ada) threads from an Ada program, or if task attributes are too slow for you. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr