linux-origin
[Top] [All Lists]

Re: broken compiler?

To: ralf@xxxxxxxxxxx (Ralf Baechle)
Subject: Re: broken compiler?
From: kanoj@xxxxxxxxxxxxxxxxxxx (Kanoj Sarcar)
Date: Tue, 28 Mar 2000 16:40:41 -0800 (PST)
Cc: linux-origin@xxxxxxxxxxx
In-reply-to: <20000329023343.C11023@xxxxxxxxxxxxxx> from "Ralf Baechle" at Mar 29, 2000 02:33:43 AM
Sender: owner-linux-origin@xxxxxxxxxxx
> > 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

<Prev in Thread] Current Thread [Next in Thread>