Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203192
b: refs/heads/master
c: b6b3ecc
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 29, 2010
1 parent 3b0f563 commit 58185ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a095cfc40ec7ebe63e9532383c5b5c2a27b14075
refs/heads/master: b6b3ecc71a0664d44ed8d087d583aee98fbf492a
6 changes: 5 additions & 1 deletion trunk/include/linux/u64_stats_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* pure reads. But if they have to fetch many values, it's better to not allow
* preemptions/interruptions to avoid many retries.
*
* 6) If counter might be written by an interrupt, readers should block interrupts.
* (On UP, there is no seqcount_t protection, a reader allowing interrupts could
* read partial values)
*
* Usage :
*
* Stats producer (writer) should use following template granted it already got
Expand All @@ -46,7 +50,7 @@
* start = u64_stats_fetch_begin(&stats->syncp);
* tbytes = stats->bytes64; // non atomic operation
* tpackets = stats->packets64; // non atomic operation
* } while (u64_stats_fetch_retry(&stats->lock, syncp));
* } while (u64_stats_fetch_retry(&stats->syncp, start));
*
*
* Example of use in drivers/net/loopback.c, using per_cpu containers,
Expand Down

0 comments on commit 58185ec

Please sign in to comment.