lkml.org 
[lkml]   [2008]   [Jan]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Bitops source problem
FromRoland Dreier <>
DateWed, 16 Jan 2008 22:44:35 -0800
 > Then, I think there is a problem with the function written below which is meant to be atomic.
 > 
 > static __inline__ void change_bit(int nr, volatile void * addr)
 > {
 >         __asm__ __volatile__(
 >                 "btcl %1,%0"
 >                 :"=m" (ADDR)
 >                 :"Ir" (nr));
 > }

If that is indeed the source of your change_bit function then there is
a problem.  However in my kernel tree there is a LOCK_PREFIX in the
definition of the atomic version.  I don't have your exact source tree
handy, but on a local RHEL4 system, the LOCK_PREFIX is still there:

static inline void change_bit(int nr, volatile unsigned long * addr)
{
        __asm__ __volatile__( LOCK_PREFIX
                "btcl %1,%0"
                :"=m" (ADDR)
                :"Ir" (nr));
}
 - R.


\
 
 \ /
  Last update: 2008-01-17 07:47    [from the cache]
©2003-2008