[lkml]   [2001]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectgnu asm help...
Hello asm gurus..

I need a simple (??) change to atomic_inc() functionality. so that i can
increment and return the
value of the variable.

current implementation in linux/include/asm/atomic.h does not do this job.

any help would be greatly appreciated.


from atomic.h

also if there is any reference to the gnu asm symtax, please send me a
i can understand what the LOCK "incl %0 means.. but not sure what the rest
is for.


static __inline__ void atomic_inc(atomic_t *v)
__asm__ __volatile__(
LOCK "incl %0"
:"=m" (v->counter)
:"m" (v->counter));

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.038 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site