> > Anyway, this is not expected behavior, so I am downgrading usage of
> > most lld/scd calls to ll/sc unless I can guarantee they are operating
> > on a 8 byte quantity (which will be dword aligned by definition). I
> > will checks that in once I test it, I have asked Ulf to see whether
> > it will help him get to miltiuser too.
>
> The bitfield operations are supposed to only be used on objects that
> are of type long or are arrays of longs. So it seems you want to fix
> things in the wrong direction?
>
> Ralf
>
I can;t say I agree completely. Firstly, the prototype definition is
(void *), (which is bad in itself). Secondly, if generic code does
have something like
long variable = xxxx.
test_and_set_bit(N, &variable)
it must guarantee that N is less than the size of a long. _Most_
generic code would then pass in a value N <= 31, to be able to
work on most architectures.
Anyway, I am modifying the code into a state where it will be easy
to revert to the current behavior by changing a couple of #defines
in bitops.h. I haven't tried the ll/sc to see whether it helps any.
Kanoj
|