[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] asm/atomic.h: common prototyping (add xen/atomic.h)
On 7/13/2016 3:12 PM, Andrew Cooper wrote: On 13/07/16 12:23, Corneliu ZUZU wrote:+typedef struct { int counter; } atomic_t; + +#define ATOMIC_INIT(i) { (i) } + +/** + * atomic_read - read atomic variable + * @v: pointer of type atomic_t + * + * Atomically reads the value of @v. + */ +static inline int atomic_read(atomic_t *v); + +/** + * _atomic_read - read atomic variable non-atomically + * @v atomic_t + * + * Non-atomically reads the value of @v + */ +static inline int _atomic_read(atomic_t v); + +/** + * atomic_set - set atomic variable + * @v: pointer of type atomic_t + * @i: required value + * + * Atomically sets the value of @v to @i. + */ +static inline void atomic_set(atomic_t *v, int i); + +/** + * _atomic_set - set atomic variable non-atomically + * @v: pointer of type atomic_t + * @i: required value + * + * Non-atomically sets the value of @v to @i. + */ +static inline void _atomic_set(atomic_t *v, int i); + Is it ok if I also omit repeating the comments which are already @ xen/atomic.h from the arch-side asm/atomic.h ? Thanks, Zuzu C. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |