Discussion:
[Gc] [PATCH] Implement the basic atomic primitives for the tilegx/tilepro cpus.
(too old to reply)
Chris Metcalf
2016-05-02 15:41:40 UTC
Permalink
Raw Message
* src/Makefile.am (nobase_private_HEADERS): Add tile.h.
* src/atomic_ops.h: Include tile.h file.
* src/atomic_ops/sysdeps/gcc/tile.h: New file.
---
For libatomic_ops:

This patch is an updated version of the CentOS 6 patch that we have
been carrying as part of our own CentOS-like distribution since 2012.

src/Makefile.am | 1 +
src/atomic_ops.h | 3 ++
src/atomic_ops/sysdeps/gcc/tile.h | 52 +++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+), 0 deletions(-)
create mode 100644 src/atomic_ops/sysdeps/gcc/tile.h

diff --git a/src/Makefile.am b/src/Makefile.am
index d463427..8971370 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -84,6 +84,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \
+ atomic_ops/sysdeps/gcc/tile.h \
atomic_ops/sysdeps/gcc/x86.h \
\
atomic_ops/sysdeps/hpc/hppa.h \
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
index ec02ba4..59f04ef 100644
--- a/src/atomic_ops.h
+++ b/src/atomic_ops.h
@@ -294,6 +294,9 @@
# if defined(__hexagon__)
# include "atomic_ops/sysdeps/gcc/hexagon.h"
# endif
+# if defined(__tile__)
+# include "atomic_ops/sysdeps/gcc/tile.h"
+# endif /* __tile__ */
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */

#if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
diff --git a/src/atomic_ops/sysdeps/gcc/tile.h b/src/atomic_ops/sysdeps/gcc/tile.h
new file mode 100644
index 0000000..28dc083
--- /dev/null
+++ b/src/atomic_ops/sysdeps/gcc/tile.h
@@ -0,0 +1,52 @@
+/*
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+/* Minimal support for tile. */
+
+#if (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) \
+ || __clang_major__ > 3 \
+ || (__clang_major__ == 3 && __clang_minor__ >= 4)) \
+ && !defined(AO_DISABLE_GCC_ATOMICS))
+
+# include "generic.h"
+
+#else /* AO_DISABLE_GCC_ATOMICS */
+
+#include "../all_atomic_load_store.h"
+
+#include "../test_and_set_t_is_ao_t.h"
+
+
+AO_INLINE void
+AO_nop_full()
+{
+ __sync_synchronize();
+}
+#define AO_HAVE_nop_full
+
+
+AO_INLINE AO_t
+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+{
+ return __sync_fetch_and_add(p, incr);
+}
+#define AO_HAVE_fetch_and_add_full
+
+
+AO_INLINE int
+AO_compare_and_swap_full(volatile AO_t *addr,
+ AO_t old, AO_t new_val)
+{
+ return __sync_val_compare_and_swap(addr, old, new_val) == old;
+}
+#define AO_HAVE_compare_and_swap_full
+
+#endif
--
1.7.1
Ivan Maidanski
2016-05-02 22:42:02 UTC
Permalink
Raw Message
Hello,

Which gcc/clang have you tested with?
Can we remove everything except include generic.h from tile.h?

Regards,
Ivan


>Mon, 2 May 2016, 18:41 +03:00 from Chris Metcalf <***@mellanox.com>:
>
>* src/Makefile.am (nobase_private_HEADERS): Add tile.h.
>* src/atomic_ops.h: Include tile.h file.
>* src/atomic_ops/sysdeps/gcc/tile.h: New file.
>---
>For libatomic_ops:
>
>This patch is an updated version of the CentOS 6 patch that we have
>been carrying as part of our own CentOS-like distribution since 2012.
>
> src/Makefile.am | 1 +
> src/atomic_ops.h | 3 ++
> src/atomic_ops/sysdeps/gcc/tile.h | 52 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 56 insertions(+), 0 deletions(-)
> create mode 100644 src/atomic_ops/sysdeps/gcc/tile.h
>
>diff --git a/src/Makefile.am b/src/Makefile.am
>index d463427..8971370 100644
>--- a/src/Makefile.am
>+++ b/src/Makefile.am
>@@ -84,6 +84,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
>           atomic_ops/sysdeps/gcc/s390.h \
>           atomic_ops/sysdeps/gcc/sh.h \
>           atomic_ops/sysdeps/gcc/sparc.h \
>+ atomic_ops/sysdeps/gcc/tile.h \
>           atomic_ops/sysdeps/gcc/x86.h \
>         \
>           atomic_ops/sysdeps/hpc/hppa.h \
>diff --git a/src/atomic_ops.h b/src/atomic_ops.h
>index ec02ba4..59f04ef 100644
>--- a/src/atomic_ops.h
>+++ b/src/atomic_ops.h
>@@ -294,6 +294,9 @@
> # if defined(__hexagon__)
> # include "atomic_ops/sysdeps/gcc/hexagon.h"
> # endif
>+# if defined(__tile__)
>+# include "atomic_ops/sysdeps/gcc/tile.h"
>+# endif /* __tile__ */
> #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
> 
> #if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
>diff --git a/src/atomic_ops/sysdeps/gcc/tile.h b/src/atomic_ops/sysdeps/gcc/tile.h
>new file mode 100644
>index 0000000..28dc083
>--- /dev/null
>+++ b/src/atomic_ops/sysdeps/gcc/tile.h
>@@ -0,0 +1,52 @@
>+/*
>+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
>+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
>+ *
>+ * Permission is hereby granted to use or copy this program
>+ * for any purpose, provided the above notices are retained on all copies.
>+ * Permission to modify the code and to distribute modified code is granted,
>+ * provided the above notices are retained, and a notice that the code was
>+ * modified is included with the above copyright notice.
>+ */
>+
>+/* Minimal support for tile. */
>+
>+#if (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) \
>+ || __clang_major__ > 3 \
>+ || (__clang_major__ == 3 && __clang_minor__ >= 4)) \
>+ && !defined(AO_DISABLE_GCC_ATOMICS))
>+
>+# include "generic.h"
>+
>+#else /* AO_DISABLE_GCC_ATOMICS */
>+
>+#include "../all_atomic_load_store.h"
>+
>+#include "../test_and_set_t_is_ao_t.h"
>+
>+
>+AO_INLINE void
>+AO_nop_full()
>+{
>+ __sync_synchronize();
>+}
>+#define AO_HAVE_nop_full
>+
>+
>+AO_INLINE AO_t
>+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
>+{
>+ return __sync_fetch_and_add(p, incr);
>+}
>+#define AO_HAVE_fetch_and_add_full
>+
>+
>+AO_INLINE int
>+AO_compare_and_swap_full(volatile AO_t *addr,
>+ AO_t old, AO_t new_val)
>+{
>+ return __sync_val_compare_and_swap(addr, old, new_val) == old;
>+}
>+#define AO_HAVE_compare_and_swap_full
>+
>+#endif
>--
>1.7.1
>_______________________________________________
>bdwgc mailing list
>***@lists.opendylan.org
>https://lists.opendylan.org/mailman/listinfo/bdwgc
Chris Metcalf
2016-05-02 22:48:29 UTC
Permalink
Raw Message
I tested with gcc 4.4 and 4.8. My rationale for including the earlier compiler is that it is the shipped compiler with CentOS 6, which we currently support.

On 5/2/2016 6:42 PM, Ivan Maidanski wrote:
> Hello,
>
> Which gcc/clang have you tested with?
> Can we remove everything except include generic.h from tile.h?
>
> Regards,
> Ivan
>
>
> Mon, 2 May 2016, 18:41 +03:00 from Chris Metcalf <***@mellanox.com>:
>
> * src/Makefile.am (nobase_private_HEADERS): Add tile.h.
> * src/atomic_ops.h: Include tile.h file.
> * src/atomic_ops/sysdeps/gcc/tile.h: New file.
> ---
> For libatomic_ops:
>
> This patch is an updated version of the CentOS 6 patch that we have
> been carrying as part of our own CentOS-like distribution since 2012.
>
> src/Makefile.am | 1 +
> src/atomic_ops.h | 3 ++
> src/atomic_ops/sysdeps/gcc/tile.h | 52 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 56 insertions(+), 0 deletions(-)
> create mode 100644 src/atomic_ops/sysdeps/gcc/tile.h
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index d463427..8971370 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -84,6 +84,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
> atomic_ops/sysdeps/gcc/s390.h \
> atomic_ops/sysdeps/gcc/sh.h \
> atomic_ops/sysdeps/gcc/sparc.h \
> + atomic_ops/sysdeps/gcc/tile.h \
> atomic_ops/sysdeps/gcc/x86.h \
> \
> atomic_ops/sysdeps/hpc/hppa.h \
> diff --git a/src/atomic_ops.h b/src/atomic_ops.h
> index ec02ba4..59f04ef 100644
> --- a/src/atomic_ops.h
> +++ b/src/atomic_ops.h
> @@ -294,6 +294,9 @@
> # if defined(__hexagon__)
> # include "atomic_ops/sysdeps/gcc/hexagon.h"
> # endif
> +# if defined(__tile__)
> +# include "atomic_ops/sysdeps/gcc/tile.h"
> +# endif /* __tile__ */
> #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
>
> #if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
> diff --git a/src/atomic_ops/sysdeps/gcc/tile.h b/src/atomic_ops/sysdeps/gcc/tile.h
> new file mode 100644
> index 0000000..28dc083
> --- /dev/null
> +++ b/src/atomic_ops/sysdeps/gcc/tile.h
> @@ -0,0 +1,52 @@
> +/*
> + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
> + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
> + *
> + * Permission is hereby granted to use or copy this program
> + * for any purpose, provided the above notices are retained on all copies.
> + * Permission to modify the code and to distribute modified code is granted,
> + * provided the above notices are retained, and a notice that the code was
> + * modified is included with the above copyright notice.
> + */
> +
> +/* Minimal support for tile. */
> +
> +#if (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) \
> + || __clang_major__ > 3 \
> + || (__clang_major__ == 3 && __clang_minor__ >= 4)) \
> + && !defined(AO_DISABLE_GCC_ATOMICS))
> +
> +# include "generic.h"
> +
> +#else /* AO_DISABLE_GCC_ATOMICS */
> +
> +#include "../all_atomic_load_store.h"
> +
> +#include "../test_and_set_t_is_ao_t.h"
> +
> +
> +AO_INLINE void
> +AO_nop_full()
> +{
> + __sync_synchronize();
> +}
> +#define AO_HAVE_nop_full
> +
> +
> +AO_INLINE AO_t
> +AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
> +{
> + return __sync_fetch_and_add(p, incr);
> +}
> +#define AO_HAVE_fetch_and_add_full
> +
> +
> +AO_INLINE int
> +AO_compare_and_swap_full(volatile AO_t *addr,
> + AO_t old, AO_t new_val)
> +{
> + return __sync_val_compare_and_swap(addr, old, new_val) == old;
> +}
> +#define AO_HAVE_compare_and_swap_full
> +
> +#endif
> --
> 1.7.1
> _______________________________________________
> bdwgc mailing list
> ***@lists.opendylan.org <mailto:***@lists.opendylan.org>
> https://lists.opendylan.org/mailman/listinfo/bdwgc
>
>

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
Ivan Maidanski
2016-05-11 22:49:08 UTC
Permalink
Raw Message
Hello Chris,

I've committed these 2 patches (with small modifications) to master:
*  https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f  
*  https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b  

Regards,
Ivan

>Tue, 3 May 2016, 1:48 +03:00 from Chris Metcalf <***@mellanox.com>:
>
>I tested with gcc 4.4 and 4.8.  My rationale for including the
earlier compiler is that it is the shipped compiler with CentOS 6,
which we currently support.
>On 5/2/2016 6:42 PM, Ivan Maidanski wrote:
>>Hello,
>>
>>Which gcc/clang have you tested with?
>>Can we remove everything except include generic.h from tile.h?
>>
>>Regards,
>>Ivan
>>
>>
>>>Mon, 2 May 2016, 18:41 +03:00 from Chris
Metcalf <***@mellanox.com> :
>>>
>>>*
src/Makefile.am (nobase_private_HEADERS): Add tile.h.
>>>* src/atomic_ops.h: Include tile.h file.
>>>* src/atomic_ops/sysdeps/gcc/tile.h: New file.
>>>---
>>>For libatomic_ops:
>>>
>>>This patch is an updated version of the CentOS 6 patch
that we have
>>>been carrying as part of our own CentOS-like
distribution since 2012.
>>>
>>> src/Makefile.am | 1 +
>>> src/atomic_ops.h | 3 ++
>>> src/atomic_ops/sysdeps/gcc/tile.h | 52
+++++++++++++++++++++++++++++++++++++
>>> 3 files changed, 56 insertions(+), 0 deletions(-)
>>> create mode 100644 src/atomic_ops/sysdeps/gcc/tile.h
>>>
>>>diff --git a/src/Makefile.am b/src/Makefile.am
>>>index d463427..8971370 100644
>>>--- a/src/Makefile.am
>>>+++ b/src/Makefile.am
>>>@@ -84,6 +84,7 @@ nobase_private_HEADERS =
atomic_ops/ao_version.h \
>>>           atomic_ops/sysdeps/gcc/s390.h \
>>>           atomic_ops/sysdeps/gcc/sh.h \
>>>           atomic_ops/sysdeps/gcc/sparc.h \
>>>+ atomic_ops/sysdeps/gcc/tile.h \
>>>           atomic_ops/sysdeps/gcc/x86.h \
>>>         \
>>>           atomic_ops/sysdeps/hpc/hppa.h \
>>>diff --git a/src/atomic_ops.h b/src/atomic_ops.h
>>>index ec02ba4..59f04ef 100644
>>>--- a/src/atomic_ops.h
>>>+++ b/src/atomic_ops.h
>>>@@ -294,6 +294,9 @@
>>> # if defined(__hexagon__)
>>> # include "atomic_ops/sysdeps/gcc/hexagon.h"
>>> # endif
>>>+# if defined(__tile__)
>>>+# include "atomic_ops/sysdeps/gcc/tile.h"
>>>+# endif /* __tile__ */
>>> #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
>>> 
>>> #if (defined(__IBMC__) || defined(__IBMCPP__))
&& !defined(__GNUC__) \
>>>diff --git a/src/atomic_ops/sysdeps/gcc/tile.h
b/src/atomic_ops/sysdeps/gcc/tile.h
>>>new file mode 100644
>>>index 0000000..28dc083
>>>--- /dev/null
>>>+++ b/src/atomic_ops/sysdeps/gcc/tile.h
>>>@@ -0,0 +1,52 @@
>>>+/*
>>>+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO
WARRANTY EXPRESSED
>>>+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
>>>+ *
>>>+ * Permission is hereby granted to use or copy this
program
>>>+ * for any purpose, provided the above notices are
retained on all copies.
>>>+ * Permission to modify the code and to distribute
modified code is granted,
>>>+ * provided the above notices are retained, and a
notice that the code was
>>>+ * modified is included with the above copyright
notice.
>>>+ */
>>>+
>>>+/* Minimal support for tile. */
>>>+
>>>+#if (((__GNUC__ > 4 || (__GNUC__ == 4 &&
__GNUC_MINOR__ >= 8)) \
>>>+ || __clang_major__ > 3 \
>>>+ || (__clang_major__ == 3 && __clang_minor__
>= 4)) \
>>>+ && !defined(AO_DISABLE_GCC_ATOMICS))
>>>+
>>>+# include "generic.h"
>>>+
>>>+#else /* AO_DISABLE_GCC_ATOMICS */
>>>+
>>>+#include "../all_atomic_load_store.h"
>>>+
>>>+#include "../test_and_set_t_is_ao_t.h"
>>>+
>>>+
>>>+AO_INLINE void
>>>+AO_nop_full()
>>>+{
>>>+ __sync_synchronize();
>>>+}
>>>+#define AO_HAVE_nop_full
>>>+
>>>+
>>>+AO_INLINE AO_t
>>>+AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
>>>+{
>>>+ return __sync_fetch_and_add(p, incr);
>>>+}
>>>+#define AO_HAVE_fetch_and_add_full
>>>+
>>>+
>>>+AO_INLINE int
>>>+AO_compare_and_swap_full(volatile AO_t *addr,
>>>+ AO_t old, AO_t new_val)
>>>+{
>>>+ return __sync_val_compare_and_swap(addr, old, new_val)
== old;
>>>+}
>>>+#define AO_HAVE_compare_and_swap_full
>>>+
>>>+#endif
>>>--
>>>1.7.1
>>>_______________________________________________
>>>bdwgc mailing list
>>>***@lists.opendylan.org
>>>https://lists.opendylan.org/mailman/listinfo/bdwgc
>>
>
>--
Chris Metcalf, Mellanox Technologies
>http://www.mellanox.com
>_______________________________________________
>bdwgc mailing list
>***@lists.opendylan.org
>https://lists.opendylan.org/mailman/listinfo/bdwgc
Chris Metcalf
2016-05-12 00:05:41 UTC
Permalink
Raw Message
Looks good. Thanks!
Chris

On 5/11/2016 6:49 PM, Ivan Maidanski wrote:
> Hello Chris,
>
> I've committed these 2 patches (with small modifications) to master:
> * https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
> * https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
>
> Regards,
> Ivan
>
> Tue, 3 May 2016, 1:48 +03:00 from Chris Metcalf <***@mellanox.com>:
>
> I tested with gcc 4.4 and 4.8. My rationale for including the earlier compiler is that it is the shipped compiler with CentOS 6, which we currently support.
>
> On 5/2/2016 6:42 PM, Ivan Maidanski wrote:
>> Hello,
>>
>> Which gcc/clang have you tested with?
>> Can we remove everything except include generic.h from tile.h?
>>
>> Regards,
>> Ivan
>>
>>
>> Mon, 2 May 2016, 18:41 +03:00 from Chris Metcalf <***@mellanox.com> <mailto:***@mellanox.com>:
>>
>> * src/Makefile.am (nobase_private_HEADERS): Add tile.h.
>> * src/atomic_ops.h: Include tile.h file.
>> * src/atomic_ops/sysdeps/gcc/tile.h: New file.
>> ---
>> For libatomic_ops:
>>
>> This patch is an updated version of the CentOS 6 patch that we have
>> been carrying as part of our own CentOS-like distribution since 2012.
>>
>> src/Makefile.am | 1 +
>> src/atomic_ops.h | 3 ++
>> src/atomic_ops/sysdeps/gcc/tile.h | 52 +++++++++++++++++++++++++++++++++++++
>> 3 files changed, 56 insertions(+), 0 deletions(-)
>> create mode 100644 src/atomic_ops/sysdeps/gcc/tile.h
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index d463427..8971370 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -84,6 +84,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
>> atomic_ops/sysdeps/gcc/s390.h \
>> atomic_ops/sysdeps/gcc/sh.h \
>> atomic_ops/sysdeps/gcc/sparc.h \
>> + atomic_ops/sysdeps/gcc/tile.h \
>> atomic_ops/sysdeps/gcc/x86.h \
>> \
>> atomic_ops/sysdeps/hpc/hppa.h \
>> diff --git a/src/atomic_ops.h b/src/atomic_ops.h
>> index ec02ba4..59f04ef 100644
>> --- a/src/atomic_ops.h
>> +++ b/src/atomic_ops.h
>> @@ -294,6 +294,9 @@
>> # if defined(__hexagon__)
>> # include "atomic_ops/sysdeps/gcc/hexagon.h"
>> # endif
>> +# if defined(__tile__)
>> +# include "atomic_ops/sysdeps/gcc/tile.h"
>> +# endif /* __tile__ */
>> #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
>>
>> #if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
>> diff --git a/src/atomic_ops/sysdeps/gcc/tile.h b/src/atomic_ops/sysdeps/gcc/tile.h
>> new file mode 100644
>> index 0000000..28dc083
>> --- /dev/null
>> +++ b/src/atomic_ops/sysdeps/gcc/tile.h
>> @@ -0,0 +1,52 @@
>> +/*
>> + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
>> + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
>> + *
>> + * Permission is hereby granted to use or copy this program
>> + * for any purpose, provided the above notices are retained on all copies.
>> + * Permission to modify the code and to distribute modified code is granted,
>> + * provided the above notices are retained, and a notice that the code was
>> + * modified is included with the above copyright notice.
>> + */
>> +
>> +/* Minimal support for tile. */
>> +
>> +#if (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) \
>> + || __clang_major__ > 3 \
>> + || (__clang_major__ == 3 && __clang_minor__ >= 4)) \
>> + && !defined(AO_DISABLE_GCC_ATOMICS))
>> +
>> +# include "generic.h"
>> +
>> +#else /* AO_DISABLE_GCC_ATOMICS */
>> +
>> +#include "../all_atomic_load_store.h"
>> +
>> +#include "../test_and_set_t_is_ao_t.h"
>> +
>> +
>> +AO_INLINE void
>> +AO_nop_full()
>> +{
>> + __sync_synchronize();
>> +}
>> +#define AO_HAVE_nop_full
>> +
>> +
>> +AO_INLINE AO_t
>> +AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
>> +{
>> + return __sync_fetch_and_add(p, incr);
>> +}
>> +#define AO_HAVE_fetch_and_add_full
>> +
>> +
>> +AO_INLINE int
>> +AO_compare_and_swap_full(volatile AO_t *addr,
>> + AO_t old, AO_t new_val)
>> +{
>> + return __sync_val_compare_and_swap(addr, old, new_val) == old;
>> +}
>> +#define AO_HAVE_compare_and_swap_full
>> +
>> +#endif
>> --
>> 1.7.1
>> _______________________________________________
>> bdwgc mailing list
>> ***@lists.opendylan.org <//e.mail.ru/compose/?mailto=mailto%***@lists.opendylan.org>
>> https://lists.opendylan.org/mailman/listinfo/bdwgc
>>
>>
>
> --
> Chris Metcalf, Mellanox Technologies
> http://www.mellanox.com
>
> _______________________________________________
> bdwgc mailing list
> ***@lists.opendylan.org <mailto:***@lists.opendylan.org>
> https://lists.opendylan.org/mailman/listinfo/bdwgc
>
>

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
Ivan Maidanski
2016-11-02 07:12:41 UTC
Permalink
Raw Message
Please try with CFLAGS=-DAO_DISABLE_GCC_ATOMICS
Anyway, the mentioned libatomic_ops patch is supposed to be applied to v7.6+ (which is not yet released).
--
Wed, 02 Nov 2016, 08:07 +03:00 from Helmut Grohne <***@subdivi.de>:
Hi Chris,
On Thu, May 12, 2016 at 01:49:08AM +0300, Ivan Maidanski wrote:
> I've committed these 2 patches (with small modifications) to master:
> *  https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
> *  https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
The version of libatomic_ops in Debian has finally been updated to 7.4.4
and cherry-picks 04a86642180 (https://tracker.debian.org/news/808756).
Of course, I went a head and tried to build it, but that fails
(https://jenkins.debian.net/job/rebootstrap_tilegx_gcc6_supported/10/console):
| make[3]: Entering directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| /bin/bash ../libtool  --tag=CC   --mode=compile tilegx-linux-gnu-gcc -DHAVE_CONFIG_H   -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c -o atomic_ops.lo atomic_ops.c
| libtool: compile:  tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c atomic_ops.c -o atomic_ops.o
| In file included from atomic_ops/sysdeps/gcc/tile.h:19:0,
|                  from atomic_ops.h:295,
|                  from atomic_ops.c:47:
| atomic_ops/sysdeps/gcc/generic.h:65:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:66:28: error: unknown type name 'AO_TS_t'
|    AO_test_and_set(volatile AO_TS_t *addr)
|                             ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set':
| atomic_ops/sysdeps/gcc/generic.h:68:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:68:13: note: each undeclared identifier is reported only once for each function it appears in
| atomic_ops/sysdeps/gcc/generic.h:68:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:66:37: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set(volatile AO_TS_t *addr)
|                                      ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:72:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:73:36: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_acquire(volatile AO_TS_t *addr)
|                                     ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_acquire':
| atomic_ops/sysdeps/gcc/generic.h:75:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:75:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:73:45: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_acquire(volatile AO_TS_t *addr)
|                                              ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:79:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:80:36: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_release(volatile AO_TS_t *addr)
|                                     ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_release':
| atomic_ops/sysdeps/gcc/generic.h:82:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:82:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:80:45: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_release(volatile AO_TS_t *addr)
|                                              ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:86:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:87:33: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_full(volatile AO_TS_t *addr)
|                                  ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_full':
| atomic_ops/sysdeps/gcc/generic.h:89:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:89:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:87:42: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_full(volatile AO_TS_t *addr)
|                                           ^~~~
| atomic_ops.c: At top level:
| atomic_ops.c:97:1: error: unknown type name 'AO_TS_t'
|  AO_TS_t AO_locks[AO_HASH_SIZE] = {
|  ^~~~~~~
| In file included from atomic_ops.c:47:0:
| atomic_ops.h:160:33: error: 'AO_TS_CLEAR' undeclared here (not in a function)
|  #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
|                                  ^
| atomic_ops.c:98:3: note: in expansion of macro 'AO_TS_INITIALIZER'
|    AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|    ^~~~~~~~~~~~~~~~~
| atomic_ops.c:106:31: error: unknown type name 'AO_TS_t'
|  static void lock_ool(volatile AO_TS_t *l)
|                                ^~~~~~~
| atomic_ops.c: In function 'lock_ool':
| atomic_ops.c:110:40: error: 'AO_TS_SET' undeclared (first use in this function)
|    while (AO_test_and_set_acquire(l) == AO_TS_SET)
|                                         ^~~~~~~~~
| atomic_ops.c: At top level:
| atomic_ops.c:114:30: error: unknown type name 'AO_TS_t'
|  AO_INLINE void lock(volatile AO_TS_t *l)
|                               ^~~~~~~
| In file included from atomic_ops.c:47:0:
| atomic_ops.c: In function 'lock':
| atomic_ops.c:116:53: error: 'AO_TS_SET' undeclared (first use in this function)
|    if (AO_EXPECT_FALSE(AO_test_and_set_acquire(l) == AO_TS_SET))
|                                                      ^
| atomic_ops.h:173:49: note: in definition of macro 'AO_EXPECT_FALSE'
|  # define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0)
|                                                  ^~~~
| atomic_ops.c: At top level:
| atomic_ops.c:120:32: error: unknown type name 'AO_TS_t'
|  AO_INLINE void unlock(volatile AO_TS_t *l)
|                                 ^~~~~~~
| atomic_ops.c: In function 'unlock':
| atomic_ops.c:122:3: warning: implicit declaration of function 'AO_CLEAR' [-Wimplicit-function-declaration]
|    AO_CLEAR(l);
|    ^~~~~~~~
| atomic_ops.c: At top level:
| atomic_ops.c:128:19: error: unknown type name 'AO_TS_t'
|    static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
|                    ^~~~~~~
| atomic_ops.c: In function 'AO_fetch_compare_and_swap_emulation':
| atomic_ops.c:154:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
| atomic_ops.c:176:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| atomic_ops.c: In function 'AO_store_full_emulation':
| atomic_ops.c:201:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| Makefile:603: recipe for target 'atomic_ops.lo' failed
| make[3]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| make[3]: *** [atomic_ops.lo] Error 1
| Makefile:462: recipe for target 'all' failed
| make[2]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| Makefile:474: recipe for target 'all-recursive' failed
| make[1]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4'
I'm not sure what went wrong here. Could you maybe look into it?
Maybe tile.h needs to #include "../test_and_set_t_is_ao_t.h" before
including "generic.h"?
Other than this, the tilegx bootstrap in Debian is slowly progressing
well. The toolchain appears to just work and it builds some 12 packages
already. More to come after libatomic_ops.
Helmut
Ian Wienand
2016-11-03 12:42:22 UTC
Permalink
Raw Message
On Wed, Nov 2, 2016 at 6:12 PM, Ivan Maidanski <***@mail.ru> wrote:
> Anyway, the mentioned libatomic_ops patch is supposed to be applied to v7.6+
> (which is not yet released).

Sorry about that ... I got a bit confused between branches at some point
(I messed up mips too, should be fixed now).

Yeah, I guess that cherry-pick is not going to work on 7.4 branch, even though
it applies cleanly. If we can get a backport I will gladly replace
the patch in the
Debian package until the next 7.4 release

-i
Helmut Grohne
2016-11-03 13:39:49 UTC
Permalink
Raw Message
Hi Ian,

On Thu, Nov 03, 2016 at 11:42:22PM +1100, Ian Wienand wrote:
> Yeah, I guess that cherry-pick is not going to work on 7.4 branch, even though
> it applies cleanly. If we can get a backport I will gladly replace
> the patch in the
> Debian package until the next 7.4 release

https://bugs.debian.org/841771 includes a patch that does not
necessarily work, but it lets libatomic_ops compile and makes compiling
reverse dependencies possible. Thus it helps with bootstrapping Debian
tilegx. I'd hope that libatomic_ops 7.6 is released when the rest of
essential cross compiled to tilegx. I guess I need to send patches for
guile-2.0, libbsd, openssl, gmp, and some more.

Helmut
Ivan Maidanski
2016-11-07 09:52:12 UTC
Permalink
Raw Message
Hello Helmut,
I expect to release v7.6 by the end of this year.
Regards,
Ivan
--

Thu, 03 Nov 2016, 16:39 +03:00 from Helmut Grohne <***@subdivi.de>:
Hi Ian,
On Thu, Nov 03, 2016 at 11:42:22PM +1100, Ian Wienand wrote:
> Yeah, I guess that cherry-pick is not going to work on 7.4 branch, even though
> it applies cleanly.  If we can get a backport I will gladly replace
> the patch in the
> Debian package until the next 7.4 release
https://bugs.debian.org/841771 includes a patch that does not
necessarily work, but it lets libatomic_ops compile and makes compiling
reverse dependencies possible. Thus it helps with bootstrapping Debian
tilegx. I'd hope that libatomic_ops 7.6 is released when the rest of
essential cross compiled to tilegx. I guess I need to send patches for
guile-2.0, libbsd, openssl, gmp, and some more.
Helmut
Ivan Maidanski
2016-11-07 10:34:08 UTC
Permalink
Raw Message
Hello Chris,
Does code in libatomic_ops master branch work?
Regards,
Ivan
--

Wed, 02 Nov 2016, 08:07 +03:00 from Helmut Grohne <***@subdivi.de>:
Hi Chris,
On Thu, May 12, 2016 at 01:49:08AM +0300, Ivan Maidanski wrote:
> I've committed these 2 patches (with small modifications) to master:
> *  https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
> *  https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
The version of libatomic_ops in Debian has finally been updated to 7.4.4
and cherry-picks 04a86642180 (https://tracker.debian.org/news/808756).
Of course, I went a head and tried to build it, but that fails
(https://jenkins.debian.net/job/rebootstrap_tilegx_gcc6_supported/10/console):
| make[3]: Entering directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| /bin/bash ../libtool  --tag=CC   --mode=compile tilegx-linux-gnu-gcc -DHAVE_CONFIG_H   -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c -o atomic_ops.lo atomic_ops.c
| libtool: compile:  tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c atomic_ops.c -o atomic_ops.o
| In file included from atomic_ops/sysdeps/gcc/tile.h:19:0,
|                  from atomic_ops.h:295,
|                  from atomic_ops.c:47:
| atomic_ops/sysdeps/gcc/generic.h:65:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:66:28: error: unknown type name 'AO_TS_t'
|    AO_test_and_set(volatile AO_TS_t *addr)
|                             ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set':
| atomic_ops/sysdeps/gcc/generic.h:68:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:68:13: note: each undeclared identifier is reported only once for each function it appears in
| atomic_ops/sysdeps/gcc/generic.h:68:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:66:37: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set(volatile AO_TS_t *addr)
|                                      ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:72:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:73:36: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_acquire(volatile AO_TS_t *addr)
|                                     ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_acquire':
| atomic_ops/sysdeps/gcc/generic.h:75:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:75:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:73:45: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_acquire(volatile AO_TS_t *addr)
|                                              ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:79:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:80:36: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_release(volatile AO_TS_t *addr)
|                                     ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_release':
| atomic_ops/sysdeps/gcc/generic.h:82:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:82:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:80:45: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_release(volatile AO_TS_t *addr)
|                                              ^~~~
| atomic_ops/sysdeps/gcc/generic.h: At top level:
| atomic_ops/sysdeps/gcc/generic.h:86:13: error: unknown type name 'AO_TS_VAL_t'
|    AO_INLINE AO_TS_VAL_t
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:87:33: error: unknown type name 'AO_TS_t'
|    AO_test_and_set_full(volatile AO_TS_t *addr)
|                                  ^~~~~~~
| atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_full':
| atomic_ops/sysdeps/gcc/generic.h:89:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
|              ^~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:89:25: error: expected ';' before '__atomic_test_and_set'
|      return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
|                          ^~~~~~~~~~~~~~~~~~~~~
| atomic_ops/sysdeps/gcc/generic.h:87:42: warning: unused parameter 'addr' [-Wunused-parameter]
|    AO_test_and_set_full(volatile AO_TS_t *addr)
|                                           ^~~~
| atomic_ops.c: At top level:
| atomic_ops.c:97:1: error: unknown type name 'AO_TS_t'
|  AO_TS_t AO_locks[AO_HASH_SIZE] = {
|  ^~~~~~~
| In file included from atomic_ops.c:47:0:
| atomic_ops.h:160:33: error: 'AO_TS_CLEAR' undeclared here (not in a function)
|  #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
|                                  ^
| atomic_ops.c:98:3: note: in expansion of macro 'AO_TS_INITIALIZER'
|    AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER,
|    ^~~~~~~~~~~~~~~~~
| atomic_ops.c:106:31: error: unknown type name 'AO_TS_t'
|  static void lock_ool(volatile AO_TS_t *l)
|                                ^~~~~~~
| atomic_ops.c: In function 'lock_ool':
| atomic_ops.c:110:40: error: 'AO_TS_SET' undeclared (first use in this function)
|    while (AO_test_and_set_acquire(l) == AO_TS_SET)
|                                         ^~~~~~~~~
| atomic_ops.c: At top level:
| atomic_ops.c:114:30: error: unknown type name 'AO_TS_t'
|  AO_INLINE void lock(volatile AO_TS_t *l)
|                               ^~~~~~~
| In file included from atomic_ops.c:47:0:
| atomic_ops.c: In function 'lock':
| atomic_ops.c:116:53: error: 'AO_TS_SET' undeclared (first use in this function)
|    if (AO_EXPECT_FALSE(AO_test_and_set_acquire(l) == AO_TS_SET))
|                                                      ^
| atomic_ops.h:173:49: note: in definition of macro 'AO_EXPECT_FALSE'
|  # define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0)
|                                                  ^~~~
| atomic_ops.c: At top level:
| atomic_ops.c:120:32: error: unknown type name 'AO_TS_t'
|  AO_INLINE void unlock(volatile AO_TS_t *l)
|                                 ^~~~~~~
| atomic_ops.c: In function 'unlock':
| atomic_ops.c:122:3: warning: implicit declaration of function 'AO_CLEAR' [-Wimplicit-function-declaration]
|    AO_CLEAR(l);
|    ^~~~~~~~
| atomic_ops.c: At top level:
| atomic_ops.c:128:19: error: unknown type name 'AO_TS_t'
|    static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
|                    ^~~~~~~
| atomic_ops.c: In function 'AO_fetch_compare_and_swap_emulation':
| atomic_ops.c:154:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
| atomic_ops.c:176:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| atomic_ops.c: In function 'AO_store_full_emulation':
| atomic_ops.c:201:3: error: unknown type name 'AO_TS_t'
|    AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
|    ^~~~~~~
| Makefile:603: recipe for target 'atomic_ops.lo' failed
| make[3]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| make[3]: *** [atomic_ops.lo] Error 1
| Makefile:462: recipe for target 'all' failed
| make[2]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
| Makefile:474: recipe for target 'all-recursive' failed
| make[1]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4'
I'm not sure what went wrong here. Could you maybe look into it?
Maybe tile.h needs to #include "../test_and_set_t_is_ao_t.h" before
including "generic.h"?
Other than this, the tilegx bootstrap in Debian is slowly progressing
well. The toolchain appears to just work and it builds some 12 packages
already. More to come after libatomic_ops.
Helmut
Chris Metcalf
2016-11-14 21:44:52 UTC
Permalink
Raw Message
Yes, it reports all 4 tests passed on tilegx as of the current git tip.

On 11/7/2016 5:34 AM, Ivan Maidanski wrote:
>
> Hello Chris,
>
> Does code in libatomic_ops master branch work?
>
> Regards,
> Ivan
>
> --
>
> Wed, 02 Nov 2016, 08:07 +03:00 from Helmut Grohne <***@subdivi.de>:
>
> Hi Chris,
> On Thu, May 12, 2016 at 01:49:08AM +0300, Ivan Maidanski wrote:
> > I've committed these 2 patches (with small modifications) to master:
> > * https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
> > * https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
> The version of libatomic_ops in Debian has finally been updated to 7.4.4
> and cherry-picks 04a86642180 (https://tracker.debian.org/news/808756).
> Of course, I went a head and tried to build it, but that fails
> (https://jenkins.debian.net/job/rebootstrap_tilegx_gcc6_supported/10/console):
> | make[3]: Entering directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | /bin/bash ../libtool --tag=CC --mode=compile tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c -o atomic_ops.lo atomic_ops.c
> | libtool: compile: tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c atomic_ops.c -o atomic_ops.o
> | In file included from atomic_ops/sysdeps/gcc/tile.h:19:0,
> | from atomic_ops.h:295,
> | from atomic_ops.c:47:
> | atomic_ops/sysdeps/gcc/generic.h:65:13: error: unknown type name 'AO_TS_VAL_t'
> | AO_INLINE AO_TS_VAL_t
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:66:28: error: unknown type name 'AO_TS_t'
> | AO_test_and_set(volatile AO_TS_t *addr)
> | ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set':
> | atomic_ops/sysdeps/gcc/generic.h:68:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:68:13: note: each undeclared identifier is reported only once for each function it appears in
> | atomic_ops/sysdeps/gcc/generic.h:68:25: error: expected ';' before '__atomic_test_and_set'
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
> | ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:66:37: warning: unused parameter 'addr' [-Wunused-parameter]
> | AO_test_and_set(volatile AO_TS_t *addr)
> | ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:72:13: error: unknown type name 'AO_TS_VAL_t'
> | AO_INLINE AO_TS_VAL_t
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:73:36: error: unknown type name 'AO_TS_t'
> | AO_test_and_set_acquire(volatile AO_TS_t *addr)
> | ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_acquire':
> | atomic_ops/sysdeps/gcc/generic.h:75:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:75:25: error: expected ';' before '__atomic_test_and_set'
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
> | ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:73:45: warning: unused parameter 'addr' [-Wunused-parameter]
> | AO_test_and_set_acquire(volatile AO_TS_t *addr)
> | ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:79:13: error: unknown type name 'AO_TS_VAL_t'
> | AO_INLINE AO_TS_VAL_t
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:80:36: error: unknown type name 'AO_TS_t'
> | AO_test_and_set_release(volatile AO_TS_t *addr)
> | ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_release':
> | atomic_ops/sysdeps/gcc/generic.h:82:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:82:25: error: expected ';' before '__atomic_test_and_set'
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
> | ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:80:45: warning: unused parameter 'addr' [-Wunused-parameter]
> | AO_test_and_set_release(volatile AO_TS_t *addr)
> | ^~~~
> | atomic_ops/sysdeps/gcc/generic.h: At top level:
> | atomic_ops/sysdeps/gcc/generic.h:86:13: error: unknown type name 'AO_TS_VAL_t'
> | AO_INLINE AO_TS_VAL_t
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:87:33: error: unknown type name 'AO_TS_t'
> | AO_test_and_set_full(volatile AO_TS_t *addr)
> | ^~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_full':
> | atomic_ops/sysdeps/gcc/generic.h:89:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
> | ^~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:89:25: error: expected ';' before '__atomic_test_and_set'
> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
> | ^~~~~~~~~~~~~~~~~~~~~
> | atomic_ops/sysdeps/gcc/generic.h:87:42: warning: unused parameter 'addr' [-Wunused-parameter]
> | AO_test_and_set_full(volatile AO_TS_t *addr)
> | ^~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:97:1: error: unknown type name 'AO_TS_t'
> | AO_TS_t AO_locks[AO_HASH_SIZE] = {
> | ^~~~~~~
> | In file included from atomic_ops.c:47:0:
> | atomic_ops.h:160:33: error: 'AO_TS_CLEAR' undeclared here (not in a function)
> | #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
> | ^
> | atomic_ops.c:98:3: note: in expansion of macro 'AO_TS_INITIALIZER'
> | AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER,
> | ^~~~~~~~~~~~~~~~~
> | atomic_ops.c:106:31: error: unknown type name 'AO_TS_t'
> | static void lock_ool(volatile AO_TS_t *l)
> | ^~~~~~~
> | atomic_ops.c: In function 'lock_ool':
> | atomic_ops.c:110:40: error: 'AO_TS_SET' undeclared (first use in this function)
> | while (AO_test_and_set_acquire(l) == AO_TS_SET)
> | ^~~~~~~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:114:30: error: unknown type name 'AO_TS_t'
> | AO_INLINE void lock(volatile AO_TS_t *l)
> | ^~~~~~~
> | In file included from atomic_ops.c:47:0:
> | atomic_ops.c: In function 'lock':
> | atomic_ops.c:116:53: error: 'AO_TS_SET' undeclared (first use in this function)
> | if (AO_EXPECT_FALSE(AO_test_and_set_acquire(l) == AO_TS_SET))
> | ^
> | atomic_ops.h:173:49: note: in definition of macro 'AO_EXPECT_FALSE'
> | # define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0)
> | ^~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:120:32: error: unknown type name 'AO_TS_t'
> | AO_INLINE void unlock(volatile AO_TS_t *l)
> | ^~~~~~~
> | atomic_ops.c: In function 'unlock':
> | atomic_ops.c:122:3: warning: implicit declaration of function 'AO_CLEAR' [-Wimplicit-function-declaration]
> | AO_CLEAR(l);
> | ^~~~~~~~
> | atomic_ops.c: At top level:
> | atomic_ops.c:128:19: error: unknown type name 'AO_TS_t'
> | static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
> | ^~~~~~~
> | atomic_ops.c: In function 'AO_fetch_compare_and_swap_emulation':
> | atomic_ops.c:154:3: error: unknown type name 'AO_TS_t'
> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> | ^~~~~~~
> | atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
> | atomic_ops.c:176:3: error: unknown type name 'AO_TS_t'
> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> | ^~~~~~~
> | atomic_ops.c: In function 'AO_store_full_emulation':
> | atomic_ops.c:201:3: error: unknown type name 'AO_TS_t'
> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
> | ^~~~~~~
> | Makefile:603: recipe for target 'atomic_ops.lo' failed
> | make[3]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | make[3]: *** [atomic_ops.lo] Error 1
> | Makefile:462: recipe for target 'all' failed
> | make[2]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
> | Makefile:474: recipe for target 'all-recursive' failed
> | make[1]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4'
> I'm not sure what went wrong here. Could you maybe look into it?
> Maybe tile.h needs to #include "../test_and_set_t_is_ao_t.h" before
> including "generic.h"?
> Other than this, the tilegx bootstrap in Debian is slowly progressing
> well. The toolchain appears to just work and it builds some 12 packages
> already. More to come after libatomic_ops.
> Helmut
> _______________________________________________
> bdwgc mailing list
> ***@lists.opendylan.org
> https://lists.opendylan.org/mailman/listinfo/bdwgc
>

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
Chris Metcalf
2016-11-15 03:27:34 UTC
Permalink
Raw Message
This is the first time I've seen a warning tagged onto a Mellanox email that I have sent. Not sure what's going on there.

> On Nov 14, 2016, at 7:27 PM, Chris Metcalf <***@mellanox.com> wrote:
>
> This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing
>
> Yes, it reports all 4 tests passed on tilegx as of the current git tip.
>
>> On 11/7/2016 5:34 AM, Ivan Maidanski wrote:
>>
>> Hello Chris,
>>
>> Does code in libatomic_ops master branch work?
>>
>> Regards,
>> Ivan
>>
>> --
>>
>> Wed, 02 Nov 2016, 08:07 +03:00 from Helmut Grohne <***@subdivi.de>:
>>
>> Hi Chris,
>> On Thu, May 12, 2016 at 01:49:08AM +0300, Ivan Maidanski wrote:
>> > I've committed these 2 patches (with small modifications) to master:
>> > * https://github.com/ivmai/bdwgc/commit/1240658b92c0827ace6f9ac52b3425070eed948f
>> > * https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
>> The version of libatomic_ops in Debian has finally been updated to 7.4.4
>> and cherry-picks 04a86642180 (https://tracker.debian.org/news/808756).
>> Of course, I went a head and tried to build it, but that fails
>> (https://jenkins.debian.net/job/rebootstrap_tilegx_gcc6_supported/10/console):
>> | make[3]: Entering directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
>> | /bin/bash ../libtool --tag=CC --mode=compile tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c -o atomic_ops.lo atomic_ops.c
>> | libtool: compile: tilegx-linux-gnu-gcc -DHAVE_CONFIG_H -I../src -I../src -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -Wextra -g -O2 -fdebug-prefix-map=/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -c atomic_ops.c -o atomic_ops.o
>> | In file included from atomic_ops/sysdeps/gcc/tile.h:19:0,
>> | from atomic_ops.h:295,
>> | from atomic_ops.c:47:
>> | atomic_ops/sysdeps/gcc/generic.h:65:13: error: unknown type name 'AO_TS_VAL_t'
>> | AO_INLINE AO_TS_VAL_t
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:66:28: error: unknown type name 'AO_TS_t'
>> | AO_test_and_set(volatile AO_TS_t *addr)
>> | ^~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set':
>> | atomic_ops/sysdeps/gcc/generic.h:68:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:68:13: note: each undeclared identifier is reported only once for each function it appears in
>> | atomic_ops/sysdeps/gcc/generic.h:68:25: error: expected ';' before '__atomic_test_and_set'
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED);
>> | ^~~~~~~~~~~~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:66:37: warning: unused parameter 'addr' [-Wunused-parameter]
>> | AO_test_and_set(volatile AO_TS_t *addr)
>> | ^~~~
>> | atomic_ops/sysdeps/gcc/generic.h: At top level:
>> | atomic_ops/sysdeps/gcc/generic.h:72:13: error: unknown type name 'AO_TS_VAL_t'
>> | AO_INLINE AO_TS_VAL_t
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:73:36: error: unknown type name 'AO_TS_t'
>> | AO_test_and_set_acquire(volatile AO_TS_t *addr)
>> | ^~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_acquire':
>> | atomic_ops/sysdeps/gcc/generic.h:75:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:75:25: error: expected ';' before '__atomic_test_and_set'
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE);
>> | ^~~~~~~~~~~~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:73:45: warning: unused parameter 'addr' [-Wunused-parameter]
>> | AO_test_and_set_acquire(volatile AO_TS_t *addr)
>> | ^~~~
>> | atomic_ops/sysdeps/gcc/generic.h: At top level:
>> | atomic_ops/sysdeps/gcc/generic.h:79:13: error: unknown type name 'AO_TS_VAL_t'
>> | AO_INLINE AO_TS_VAL_t
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:80:36: error: unknown type name 'AO_TS_t'
>> | AO_test_and_set_release(volatile AO_TS_t *addr)
>> | ^~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_release':
>> | atomic_ops/sysdeps/gcc/generic.h:82:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:82:25: error: expected ';' before '__atomic_test_and_set'
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE);
>> | ^~~~~~~~~~~~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:80:45: warning: unused parameter 'addr' [-Wunused-parameter]
>> | AO_test_and_set_release(volatile AO_TS_t *addr)
>> | ^~~~
>> | atomic_ops/sysdeps/gcc/generic.h: At top level:
>> | atomic_ops/sysdeps/gcc/generic.h:86:13: error: unknown type name 'AO_TS_VAL_t'
>> | AO_INLINE AO_TS_VAL_t
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:87:33: error: unknown type name 'AO_TS_t'
>> | AO_test_and_set_full(volatile AO_TS_t *addr)
>> | ^~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h: In function 'AO_test_and_set_full':
>> | atomic_ops/sysdeps/gcc/generic.h:89:13: error: 'AO_TS_VAL_t' undeclared (first use in this function)
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
>> | ^~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:89:25: error: expected ';' before '__atomic_test_and_set'
>> | return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST);
>> | ^~~~~~~~~~~~~~~~~~~~~
>> | atomic_ops/sysdeps/gcc/generic.h:87:42: warning: unused parameter 'addr' [-Wunused-parameter]
>> | AO_test_and_set_full(volatile AO_TS_t *addr)
>> | ^~~~
>> | atomic_ops.c: At top level:
>> | atomic_ops.c:97:1: error: unknown type name 'AO_TS_t'
>> | AO_TS_t AO_locks[AO_HASH_SIZE] = {
>> | ^~~~~~~
>> | In file included from atomic_ops.c:47:0:
>> | atomic_ops.h:160:33: error: 'AO_TS_CLEAR' undeclared here (not in a function)
>> | #define AO_TS_INITIALIZER (AO_t)AO_TS_CLEAR
>> | ^
>> | atomic_ops.c:98:3: note: in expansion of macro 'AO_TS_INITIALIZER'
>> | AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER, AO_TS_INITIALIZER,
>> | ^~~~~~~~~~~~~~~~~
>> | atomic_ops.c:106:31: error: unknown type name 'AO_TS_t'
>> | static void lock_ool(volatile AO_TS_t *l)
>> | ^~~~~~~
>> | atomic_ops.c: In function 'lock_ool':
>> | atomic_ops.c:110:40: error: 'AO_TS_SET' undeclared (first use in this function)
>> | while (AO_test_and_set_acquire(l) == AO_TS_SET)
>> | ^~~~~~~~~
>> | atomic_ops.c: At top level:
>> | atomic_ops.c:114:30: error: unknown type name 'AO_TS_t'
>> | AO_INLINE void lock(volatile AO_TS_t *l)
>> | ^~~~~~~
>> | In file included from atomic_ops.c:47:0:
>> | atomic_ops.c: In function 'lock':
>> | atomic_ops.c:116:53: error: 'AO_TS_SET' undeclared (first use in this function)
>> | if (AO_EXPECT_FALSE(AO_test_and_set_acquire(l) == AO_TS_SET))
>> | ^
>> | atomic_ops.h:173:49: note: in definition of macro 'AO_EXPECT_FALSE'
>> | # define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0)
>> | ^~~~
>> | atomic_ops.c: At top level:
>> | atomic_ops.c:120:32: error: unknown type name 'AO_TS_t'
>> | AO_INLINE void unlock(volatile AO_TS_t *l)
>> | ^~~~~~~
>> | atomic_ops.c: In function 'unlock':
>> | atomic_ops.c:122:3: warning: implicit declaration of function 'AO_CLEAR' [-Wimplicit-function-declaration]
>> | AO_CLEAR(l);
>> | ^~~~~~~~
>> | atomic_ops.c: At top level:
>> | atomic_ops.c:128:19: error: unknown type name 'AO_TS_t'
>> | static volatile AO_TS_t init_lock = AO_TS_INITIALIZER;
>> | ^~~~~~~
>> | atomic_ops.c: In function 'AO_fetch_compare_and_swap_emulation':
>> | atomic_ops.c:154:3: error: unknown type name 'AO_TS_t'
>> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
>> | ^~~~~~~
>> | atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
>> | atomic_ops.c:176:3: error: unknown type name 'AO_TS_t'
>> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
>> | ^~~~~~~
>> | atomic_ops.c: In function 'AO_store_full_emulation':
>> | atomic_ops.c:201:3: error: unknown type name 'AO_TS_t'
>> | AO_TS_t *my_lock = AO_locks + AO_HASH(addr);
>> | ^~~~~~~
>> | Makefile:603: recipe for target 'atomic_ops.lo' failed
>> | make[3]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
>> | make[3]: *** [atomic_ops.lo] Error 1
>> | Makefile:462: recipe for target 'all' failed
>> | make[2]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4/src'
>> | Makefile:474: recipe for target 'all-recursive' failed
>> | make[1]: Leaving directory '/tmp/buildd/libatomic-ops/libatomic-ops-7.4.4'
>> I'm not sure what went wrong here. Could you maybe look into it?
>> Maybe tile.h needs to #include "../test_and_set_t_is_ao_t.h" before
>> including "generic.h"?
>> Other than this, the tilegx bootstrap in Debian is slowly progressing
>> well. The toolchain appears to just work and it builds some 12 packages
>> already. More to come after libatomic_ops.
>> Helmut
>> _______________________________________________
>> bdwgc mailing list
>> ***@lists.opendylan.org
>> https://lists.opendylan.org/mailman/listinfo/bdwgc
>>
>
> --
> Chris Metcalf, Mellanox Technologies
> http://www.mellanox.com
> _______________________________________________
> bdwgc mailing list
> ***@lists.opendylan.org
> https://lists.opendylan.org/mailman/listinfo/bdwgc
Loading...