From 14b7e9e875d9dd43d645b7d0a68f945404683af8 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Fri, 26 Jul 2013 17:43:49 -0400 Subject: [PATCH] doc: Add CK_SEQUENCE_READ documentation. --- doc/ck_sequence | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/ck_sequence b/doc/ck_sequence index cc7c09f..4dff7f0 100644 --- a/doc/ck_sequence +++ b/doc/ck_sequence @@ -99,15 +99,21 @@ reader(void) * ck_sequence_read_retry then attempt another read since * the data may be in an inconsistent state. */ - CK_SEQUENCE_READ(&seqlock, &version) { - copy = global; - } - do { version = ck_sequence_read_begin(&seqlock); copy = global; } while (ck_sequence_read_retry(&seqlock, version)); + /* + * The previous may also be expressed using CK_SEQUENCE_READ. + * Generally recommend to only use ck_sequence_read_retry + * if you would like to detect a conflicting write at some + * higher granularity. + */ + CK_SEQUENCE_READ(&seqlock, version) { + copy = global; + } + return; }