Skip to contentSkip to conversation

staging: android: describe use of memory barrier on sync.c

PATCH New Niv Yehezkel 1 participant 1 message May 24, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: describe use of memory barrier on sync.c

Added comments describing the purpose of using write memory barrier in the context of sync_timeline_destory.

---
 drivers/staging/android/sync.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/staging/android/sync.c +4 -0
index 1f88c5d..18174f7 100644
@@ -92,6 +92,10 @@ static void sync_timeline_free(struct kref *kref)
 void sync_timeline_destroy(struct sync_timeline *obj)
 {
 	obj->destroyed = true;
+	/*
+	 * Ensure timeline is marked as destroyed before
+	 * changing timeline's fences status.
+	 */
 	smp_wmb();
 
 	/*
Signature · 1 line
1.7.10.4