This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [MTASCsft PATCH 04/??] MT-, AS- and AC-safety docs: manual/charset.texi
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: codonell at redhat dot com, libc-alpha at sourceware dot org
- Date: Wed, 29 Jan 2014 04:20:02 -0200
- Subject: Re: [MTASCsft PATCH 04/??] MT-, AS- and AC-safety docs: manual/charset.texi
- Authentication-results: sourceware.org; auth=none
- References: <ortxelb5zd dot fsf at livre dot home> <or4n4uoncj dot fsf at livre dot home> <ormwimn3cc dot fsf_-_ at livre dot home> <52E89670 dot 7000001 at redhat dot com>
On Jan 29, 2014, "Carlos O'Donell" <carlos@redhat.com> wrote:
> On 01/23/2014 10:08 AM, Alexandre Oliva wrote:
>> @deftypefun int mbsinit (const mbstate_t *@var{ps})
>> +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
>> +@c ps is dereferenced once, unguarded. Potential harmless data race.
> More comments explaining why this is a harmless or not-harmless data race,
> and why we don't mark everything up with @mtsrace{:ps}. We will consider
> mbsinit's comment to be a central place to talk about all of this.
How about this?
@c ps is dereferenced once, unguarded. This would call for @mtsrace:ps,
@c but since a single word-sized field is (atomically) accessed, any
@c race here would be harmless. Other functions that take an optional
@c mbstate_t* argument named ps are marked with @mtasurace:<func>/!ps,
@c to indicate that the function uses a static buffer if ps is NULL.
@c These could also have been marked with @mtsrace:ps, but we'll omit
@c that for brevity, for it's somewhat redundant with the @mtasurace.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Toolchain Engineer