lkml.org 
[lkml]   [2014]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: atomic read and increment question
noman pouigt wrote:
> x = 1;
> temp = atomic_read_increment(x);

atomic_set(&x, 1);
temp = atomic_inc_return(&x);

> I looked through the documentation for atomic
> operations but couldn't find out the api

Not everything is fully documented.

Look through include/asm-generic/atomic.h.


Regards,
Clemens


\
 
 \ /
  Last update: 2014-03-18 12:41    [W:0.028 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site