atomic read and increment question

From: noman pouigt
Date: Tue Mar 18 2014 - 04:26:25 EST


Hello,

I looked through the documentation for atomic
operations but couldn't find out the api for following
operation:

x = 1;
temp = atomic_read_increment(x);

so basically this will read the old value of x in temp
and then increment x.

so temp = 1 and x = 2.

Is this api already available?

Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/