* [Xenomai-core] [PATCH] Add barrier to xnlock_put
@ 2008-03-01 9:48 Jan Kiszka
2008-03-01 12:40 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2008-03-01 9:48 UTC (permalink / raw)
To: Xenomai-core
[-- Attachment #1.1: Type: text/plain, Size: 194 bytes --]
To avoid that this gets lost in the discussion about my xnlock
refactoring, here is a separate patch to fix the SMP behavior of
xnlock_put. OK to merge it into trunk and stable trees?
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: add-barrier-to-xnlock_put.patch --]
[-- Type: text/x-patch; name="add-barrier-to-xnlock_put.patch", Size: 1111 bytes --]
---
ChangeLog | 4 ++++
include/asm-generic/system.h | 6 ++++++
2 files changed, 10 insertions(+)
Index: b/include/asm-generic/system.h
===================================================================
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -307,6 +307,12 @@ static inline void xnlock_put (xnlock_t
xnlock_stats[cpu].line = lock->line;
}
#endif /* XENO_DEBUG(NUCLEUS) */
+ /*
+ * Make sure all data written inside the lock is visible to
+ * other CPUs before we release the lock.
+ */
+ xnarch_memory_barrier();
+
atomic_set(&lock->owner, ~0);
}
#if XENO_DEBUG(NUCLEUS)
Index: b/ChangeLog
===================================================================
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-01 Jan Kiszka <jan.kiszka@domain.hid>
+
+ * include/asm-generic/system.h (xnlock_put): Add proper barrier.
+
2008-02-15 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
* src/skins/posix/thread.c (__wrap_pthread_create): Follow more
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] [PATCH] Add barrier to xnlock_put
2008-03-01 9:48 [Xenomai-core] [PATCH] Add barrier to xnlock_put Jan Kiszka
@ 2008-03-01 12:40 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-03-01 12:40 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
Jan Kiszka wrote:
> To avoid that this gets lost in the discussion about my xnlock
> refactoring, here is a separate patch to fix the SMP behavior of
> xnlock_put. OK to merge it into trunk and stable trees?
Ok.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-01 12:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-01 9:48 [Xenomai-core] [PATCH] Add barrier to xnlock_put Jan Kiszka
2008-03-01 12:40 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.