www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <003701c0d46a$939548b0$63752ec3@dima> |
From: | "Dmitry Timoshkov" <dmitry AT sloboda DOT ru> |
To: | <cygwin AT cygwin DOT com> |
References: | <001501c0d3c4$bf0af130$26823bd5 AT dima> |
Subject: | Re: __errno_location() like functionality in Cygwin |
Date: | Fri, 4 May 2001 15:18:14 +0800 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
X-MDRcpt-To: | cygwin AT cygwin DOT com |
X-MDRemoteIP: | 195.46.117.99 |
X-Return-Path: | dmitry AT sloboda DOT ru |
X-MDaemon-Deliver-To: | cygwin AT cygwin DOT com |
Hello again. I wrote: > I'm new to this list. I'd like to know, is it possible to define > my own __errno() function, which will provide functionality like > __errno_location() in linux? > > This simple program works in linux, but doesn't under Cygwin: [sample skipped] I'm sorry, perhaps I sent too little information to make things to be more clear. I have installed Cygwin 1.1.8 on win2000 and want to port multithreaded application that currently works under Linux. That application allocates for each created thread Thread Local Storage and saves in it its own errno variable. Application defines its own function __errno_location in which it returns address of that thread local errno variable. Can anybody shed some light whether it possible or not to do the same trick under Cygwin? Or just say that it is impossible? I searched archives of this mailing list and have read FAQ and documentation about two possible ways to achieve reentrancy using reent struct. The first method requires to replace all standard library calls by their _*_r equivalents. That's not an option. The second method requires to assign _impure_ptr to the pointer of thread local reent structrure before EVERY libc call. Am I understand it correctly? Thanks in advance for any pointers and suggestions. -- Dmitry. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |