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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c96afc4bd5bda0f0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news.glorb.com!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: =?iso-8859-1?q?Bj=F6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: Gnat 3.4.2 tasking errorcodes windows Date: Tue, 18 Jan 2005 19:52:48 +0100 Organization: Cuivre, Argent, Or Message-ID: References: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1106074395 5337 212.85.156.195 (18 Jan 2005 18:53:15 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 18 Jan 2005 18:53:15 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:7893 Date: 2005-01-18T19:52:48+01:00 m=E5ndag 17 januari 2005 23:04 skrev Randy Brukardt: > "Bj=F6rn Lundin" wrote in message > news:mailman.65.1105991123.527.comp.lang.ada@ada-france.org... > ... > > > What I wonder is why I can get the correct errorcode by calling > > WSAGetLasterror (which is what Gnat.Sockets.Thin.Socket Errno does, just > > pragma import) when having no tasks, but not when having tasks. > > I wouldn't expect that to work. WSAGetLastError isn't necessarily > thread-safe: I believe that there is only one global copy per process.=20 Hmm, not according to: In short from the webpage: Return Values The return value indicates the error code for this thread's last Windows=20 Sockets operation that failed. Remarks The WSAGetLastError function returns returns the last error that occurred f= or=20 the calling thread.=20 So Microsoft thinks it's thread/task safe and it is if I use Object Ada. No= w,=20 I'm (my company) is moving from Object Ada to Gnat, but this one is a=20 showstopper :( (We already did the transition on Aix, and I like gnat more= =20 than OA) Nicolas explained to me that what I want will not work with 3.15 or with=20 3.4.2 :( but the explanation of libaddress2line was good news.=20 > I would guess that the reason that Gnat.Sockets.Thin directly accesses via > Import is that it assumes no tasking issues. In any case, why access this > directly? You're just asking for trouble, by making yourself rediscover > things that the binding writers already did. I dont' use gnat.sockets directly, I use a 10 year old homemade interface,= =20 that works with other compilers and operating systems, and won't break lega= cy=20 code in production on several sites.=20 The sample I sent was to illustrate my problem with known 'standardcode' /Bj=F6rn > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada-france.org > http://www.ada-france.org/mailman/listinfo/comp.lang.ada