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 01/29/2014 01:20 AM, Alexandre Oliva wrote:
> 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.
 
Perfect.

c.


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