This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [RFC]setlocale() race condition
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Sharyathi Nagesh" <sharyath at in dot ibm dot com>
- Cc: "Mark Brown" <bmark at us dot ibm dot com>, libc-help at sourceware dot org, sripathi at in dot ibm dot com, suzukikp at in dot ibm dot com, tim_preece at uk dot ibm dot com
- Date: Fri, 13 Jun 2008 09:54:53 -0400
- Subject: Re: [RFC]setlocale() race condition
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=aABqtDpu6TzOjGG2dN1farWQK+nGtKUXIlwYsSNkJJ4=; b=Es11qhoVfP4ym4fDm4S/xI09L9KWzX2tfTxmbG8mVn4GW0Lw5OY8RzDutREW/6/mHW +Ot7w+iUd+czeAGClrLaNARED39E5Fl/hukAwny85KnWv8YF/51wGbWDM3hZvUdMuy28 B5v6RYuEsWoxUY/621Y5ktEtmDOVSj8oKYSB8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=qTPCHRf/U/POpjpCuFUwKsA/d/gh9HfvuikMoQ53R/tyKrkSYn77SESTWhgje9iMyw mEQaBjzp8HwMLbb/kb2lwNakMsOZpdtlTXpfY1FCO/de0FE/WOeogZLlI5/3of9XR79b rf6orAzTWiqVfmkHWxsQtpFcvS9jtigib7fOc=
- References: <48509BC2.8040102@in.ibm.com> <119aab440806120700o5de4cb95w441937930b3dfeb@mail.gmail.com> <OF63289371.657FC9A8-ON86257466.00590DCB-86257466.005A1854@us.ibm.com> <48520904.8020406@in.ibm.com> <119aab440806130651g4b598fa7wdf2c589276163f9a@mail.gmail.com>
On Fri, Jun 13, 2008 at 1:43 AM, Sharyathi Nagesh <sharyath@in.ibm.com> wrote:
> So can access to this global variable made thread safe even if function is
> not re-enterant
Yes, access to the global variable *can* be made thread-safe (even
though the function is not re-entrant due specifically to the use of a
global variable).
It would be best if you found a URL reference for the section quoted
by Mark Brown regarding thread-safety. I assume Mark is talking about
this:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
~~~
Section 2.9.1 Thread Safety
All functions defined by this volume of IEEE Std 1003.1-2001 shall be
thread-safe, except that the following functions1 need not be
thread-safe.
~~~
This is the type of rationale you need put forward to get your patches
accepted, along with the contribution checklist
http://sourceware.org/glibc/wiki/Contribution%20checklist
Cheers,
Carlos.