svn commit: r221614 - projects/largeSMP/sys/powerpc/include

mdf at FreeBSD.org mdf at FreeBSD.org
Thu May 12 21:32:46 UTC 2011


On Thu, May 12, 2011 at 2:12 PM, Attilio Rao <attilio at freebsd.org> wrote:
> 2011/5/12 Artem Belevich <art at freebsd.org>:
>> On Thu, May 12, 2011 at 10:05 PM, Attilio Rao <attilio at freebsd.org> wrote:
>>> I spoke in person with Artem and in the end I just decided to make the
>>> smallest possible subset of changes to fix the _long on 32 bits and
>>> then "completed" (as some of them already exist today) the macro
>>> converting the arguments to u_int stuff:
>>> http://www.freebsd.org/~attilio/largeSMP/mips-atomic2.diff
>>
>> Attilio,
>>
>> Let's get back for a second to the original issue you had that propted
>> you to do atomic ops changes.
>> If I understand you correctly, your code was passing cpuset_t* as an
>> argument to atomic_something_long and that caused compiler to complain
>> that cpuset_t* is not uint32_t*.
>>
>> Could you post definition of cpuset_t ?
>>
>> It's possible that compiler was actually correct. For instance,
>> compiler would be right to complain if cpuset_t is a packed structure,
>> even if that structure is made of a single uint32_t field.
>
> It doesn't do the atomic of  cpuset_t, it does atomic of members of
> cpuset_t which are actually long.

Isn't this an argument for making it an array of u_int, even though
it's marginally pessimal on amd64 and other 64-bit arches?  There is
guaranteed support for a int-sized (or perhaps 32-bit sized) atomic
op.

Cheers,
matthew


More information about the svn-src-projects mailing list