[LV] Back to the VAX: bitops

Jan-Benedict Glaw jbglaw at lug-owl.de
Sat Apr 1 16:20:47 CEST 2006


Hi!

Finally, my move is mostly finished and I've started to look at the
VAXen again.  I'm currently looking at <asm/bitops.h>, which should
get a touch-up to use the newly defined generic functions in
<asm-generic/bitops/*>.

Was there a specific reason for this:

/* Supposed to not be atomic.  */
static __inline__ void __set_bit(int nr, volatile void *addr)
{
        __asm__(
        "       bbss    %1, %0, 2f              \n"
        "2:                                     \n"
        : "=m" (ADDR)
        : "ir" (nr));
}

/* Supposed to be atomic.  */
static __inline__ void set_bit(int nr, volatile void *addr)
{
        __asm__ __volatile__(
        "       bbss    %1, %0, 1f              \n"
        "1:                                     \n"
        : "=m" (ADDR)
        : "ir" (nr));
}


In both cases, bbss was chosen, but I guess bbssi would have been more
correct for set_bit()?

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lug-owl.de/pipermail/vax-linux/attachments/20060401/1499ed58/attachment.pgp>
-------------- next part --------------
_______________________________________________
Linux-Vax mailing list
Linux-Vax at pergamentum.com
http://www.pergamentum.com/mailman/listinfo/linux-vax


More information about the Vax-linux mailing list