From 9fdee25ae12e9fc3fcfdadee441b551ca9e929d4 Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Thu, 12 May 2016 23:28:36 +0300 Subject: [PATCH] gcc/generic-small.h: Add TODO items * src/atomic_ops/sysdeps/gcc/generic-small.h: Regenerate. * src/atomic_ops/sysdeps/gcc/generic-small.template: Add TODO items for XSIZE_load_read, XSIZE_load_full, XSIZE_load_dd_acquire_read, XSIZE_store_write. --- src/atomic_ops/sysdeps/gcc/generic-small.h | 52 +++++++++++++++++-- .../sysdeps/gcc/generic-small.template | 13 ++++- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/atomic_ops/sysdeps/gcc/generic-small.h b/src/atomic_ops/sysdeps/gcc/generic-small.h index ef91e5a..c9b3fbc 100644 --- a/src/atomic_ops/sysdeps/gcc/generic-small.h +++ b/src/atomic_ops/sysdeps/gcc/generic-small.h @@ -29,10 +29,21 @@ AO_char_load_acquire(const volatile unsigned/**/char *addr) } #define AO_HAVE_char_load_acquire -/* char_load_full is generalized using load and nop_full, so that */ /* char_load_read is defined using load and nop_read. */ +/* TODO: Map it to ACQUIRE. We should be strengthening the read and */ +/* write stuff to the more general acquire/release versions. It almost */ +/* never makes a difference and is much less error-prone. */ + +/* char_load_full is generalized using load and nop_full. */ +/* TODO: Map it to SEQ_CST and clarify the documentation. */ + +/* TODO: Map load_dd_acquire_read to ACQUIRE. Ideally it should be */ +/* mapped to CONSUME, but the latter is currently broken. */ + /* char_store_full definition is omitted similar to load_full reason. */ +/* TODO: Map store_write to RELEASE. */ + #ifndef AO_SKIPATOMIC_char_store AO_INLINE void AO_char_store(volatile unsigned/**/char *addr, unsigned/**/char value) @@ -172,10 +183,21 @@ AO_short_load_acquire(const volatile unsigned/**/short *addr) } #define AO_HAVE_short_load_acquire -/* short_load_full is generalized using load and nop_full, so that */ /* short_load_read is defined using load and nop_read. */ +/* TODO: Map it to ACQUIRE. We should be strengthening the read and */ +/* write stuff to the more general acquire/release versions. It almost */ +/* never makes a difference and is much less error-prone. */ + +/* short_load_full is generalized using load and nop_full. */ +/* TODO: Map it to SEQ_CST and clarify the documentation. */ + +/* TODO: Map load_dd_acquire_read to ACQUIRE. Ideally it should be */ +/* mapped to CONSUME, but the latter is currently broken. */ + /* short_store_full definition is omitted similar to load_full reason. */ +/* TODO: Map store_write to RELEASE. */ + #ifndef AO_SKIPATOMIC_short_store AO_INLINE void AO_short_store(volatile unsigned/**/short *addr, unsigned/**/short value) @@ -315,10 +337,21 @@ AO_int_load_acquire(const volatile unsigned *addr) } #define AO_HAVE_int_load_acquire -/* int_load_full is generalized using load and nop_full, so that */ /* int_load_read is defined using load and nop_read. */ +/* TODO: Map it to ACQUIRE. We should be strengthening the read and */ +/* write stuff to the more general acquire/release versions. It almost */ +/* never makes a difference and is much less error-prone. */ + +/* int_load_full is generalized using load and nop_full. */ +/* TODO: Map it to SEQ_CST and clarify the documentation. */ + +/* TODO: Map load_dd_acquire_read to ACQUIRE. Ideally it should be */ +/* mapped to CONSUME, but the latter is currently broken. */ + /* int_store_full definition is omitted similar to load_full reason. */ +/* TODO: Map store_write to RELEASE. */ + #ifndef AO_SKIPATOMIC_int_store AO_INLINE void AO_int_store(volatile unsigned *addr, unsigned value) @@ -458,10 +491,21 @@ AO_load_acquire(const volatile AO_t *addr) } #define AO_HAVE_load_acquire -/* load_full is generalized using load and nop_full, so that */ /* load_read is defined using load and nop_read. */ +/* TODO: Map it to ACQUIRE. We should be strengthening the read and */ +/* write stuff to the more general acquire/release versions. It almost */ +/* never makes a difference and is much less error-prone. */ + +/* load_full is generalized using load and nop_full. */ +/* TODO: Map it to SEQ_CST and clarify the documentation. */ + +/* TODO: Map load_dd_acquire_read to ACQUIRE. Ideally it should be */ +/* mapped to CONSUME, but the latter is currently broken. */ + /* store_full definition is omitted similar to load_full reason. */ +/* TODO: Map store_write to RELEASE. */ + #ifndef AO_SKIPATOMIC_store AO_INLINE void AO_store(volatile AO_t *addr, AO_t value) diff --git a/src/atomic_ops/sysdeps/gcc/generic-small.template b/src/atomic_ops/sysdeps/gcc/generic-small.template index 00296b6..d4f270b 100644 --- a/src/atomic_ops/sysdeps/gcc/generic-small.template +++ b/src/atomic_ops/sysdeps/gcc/generic-small.template @@ -29,10 +29,21 @@ AO_XSIZE_load_acquire(const volatile XCTYPE *addr) } #define AO_HAVE_XSIZE_load_acquire -/* XSIZE_load_full is generalized using load and nop_full, so that */ /* XSIZE_load_read is defined using load and nop_read. */ +/* TODO: Map it to ACQUIRE. We should be strengthening the read and */ +/* write stuff to the more general acquire/release versions. It almost */ +/* never makes a difference and is much less error-prone. */ + +/* XSIZE_load_full is generalized using load and nop_full. */ +/* TODO: Map it to SEQ_CST and clarify the documentation. */ + +/* TODO: Map load_dd_acquire_read to ACQUIRE. Ideally it should be */ +/* mapped to CONSUME, but the latter is currently broken. */ + /* XSIZE_store_full definition is omitted similar to load_full reason. */ +/* TODO: Map store_write to RELEASE. */ + #ifndef AO_SKIPATOMIC_XSIZE_store AO_INLINE void AO_XSIZE_store(volatile XCTYPE *addr, XCTYPE value) -- 2.40.0