gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] SHM broken


From: Hal Murray
Subject: Re: [gpsd-dev] SHM broken
Date: Tue, 24 Mar 2015 13:44:57 -0700

> Do you actually see working memory barriers on non-C11 compiles?

Good question.

gpsd.h says:
#define HAVE_STDATOMIC_H 1

I can't find anything that looks right in objdump output.

Looks like a bug in compiler.h
It's testing STD_ATOMIC_H
stdatomic.h is setting _STDATOMIC_H
This is one system.  I'll go see what happens on others.

diff --git a/compiler.h b/compiler.h
index 4fde42d..53902dc 100644
--- a/compiler.h
+++ b/compiler.h
@@ -81,7 +81,7 @@ static /address@hidden@*/ inline void memory_barrier(void)
 /* prevent instruction reordering across any call to this function */
 {
 #ifndef S_SPLINT_S
-#ifdef STD_ATOMIC_H
+#ifdef _STDATOMIC_H
 #ifndef __COVERITY__
     atomic_thread_fence(memory_order_seq_cst);
 #endif /* __COVERITY__ */

Works now.

---

objdump -S doesn't show any source.
Is there something funny I'm doing?
It works in other contexts.


-- 
These are my opinions.  I hate spam.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]