Browse Source

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.

Signed-off-by: Niv Yehezkel <executerx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Niv Yehezkel 11 years ago
parent
commit
296066093b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/staging/android/sync.c

+ 4 - 0
drivers/staging/android/sync.c

@@ -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();
 
 	/*