@@ -108,7 +108,7 @@ void core_util_critical_section_exit(void);
108
108
*
109
109
* function incr(p : pointer to int, a : int) returns int {
110
110
* done = false
111
- * * value = *p // This fetch operation need not be atomic.
111
+ * value = *p // This fetch operation need not be atomic.
112
112
* while not done {
113
113
* done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
114
114
* }
@@ -161,7 +161,7 @@ bool core_util_atomic_cas_u8(uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_
161
161
*
162
162
* function incr(p : pointer to int, a : int) returns int {
163
163
* done = false
164
- * * value = *p // This fetch operation need not be atomic.
164
+ * value = *p // This fetch operation need not be atomic.
165
165
* while not done {
166
166
* done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
167
167
* }
@@ -214,7 +214,7 @@ bool core_util_atomic_cas_u16(uint16_t *ptr, uint16_t *expectedCurrentValue, uin
214
214
*
215
215
* function incr(p : pointer to int, a : int) returns int {
216
216
* done = false
217
- * * value = *p // This fetch operation need not be atomic.
217
+ * value = *p // This fetch operation need not be atomic.
218
218
* while not done {
219
219
* done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
220
220
* }
@@ -267,7 +267,7 @@ bool core_util_atomic_cas_u32(uint32_t *ptr, uint32_t *expectedCurrentValue, uin
267
267
*
268
268
* function incr(p : pointer to int, a : int) returns int {
269
269
* done = false
270
- * * value = *p // This fetch operation need not be atomic.
270
+ * value = *p // This fetch operation need not be atomic.
271
271
* while not done {
272
272
* done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success
273
273
* }
@@ -303,8 +303,11 @@ uint32_t core_util_atomic_incr_u32(uint32_t *valuePtr, uint32_t delta);
303
303
/**
304
304
* Atomic increment.
305
305
* @param valuePtr Target memory location being incremented.
306
- * @param delta The amount being incremented.
306
+ * @param delta The amount being incremented in bytes .
307
307
* @return The new incremented value.
308
+ *
309
+ * @note The type of the pointer argument is not taken into account
310
+ * and the pointer is incremented by bytes.
308
311
*/
309
312
void * core_util_atomic_incr_ptr (void * * valuePtr , ptrdiff_t delta );
310
313
@@ -335,8 +338,11 @@ uint32_t core_util_atomic_decr_u32(uint32_t *valuePtr, uint32_t delta);
335
338
/**
336
339
* Atomic decrement.
337
340
* @param valuePtr Target memory location being decremented.
338
- * @param delta The amount being decremented.
341
+ * @param delta The amount being decremented in bytes .
339
342
* @return The new decremented value.
343
+ *
344
+ * @note The type of the pointer argument is not taken into account
345
+ * and the pointer is decremented by bytes
340
346
*/
341
347
void * core_util_atomic_decr_ptr (void * * valuePtr , ptrdiff_t delta );
342
348
0 commit comments