This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MTASCsft PATCH 04/??] MT-, AS- and AC-safety docs: manual/charset.texi


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]