Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158400
b: refs/heads/master
c: da706d8
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Frederic Weisbecker committed Jul 16, 2009
1 parent 48f0504 commit 2182c98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: e202687927c132b1e1ff36b526b5e78ac33de840
refs/heads/master: da706d8bc833e7153622435560422e653bdb2e94
9 changes: 7 additions & 2 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,14 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
* This will only succeed if an interrupt did
* not come in and change it. In which case, we
* do not want to modify it.
*
* We add (void) to let the compiler know that we do not care
* about the return value of these functions. We use the
* cmpxchg to only update if an interrupt did not already
* do it for us. If the cmpxchg fails, we don't care.
*/
local_cmpxchg(&next_page->write, old_write, val);
local_cmpxchg(&next_page->entries, old_entries, eval);
(void)local_cmpxchg(&next_page->write, old_write, val);
(void)local_cmpxchg(&next_page->entries, old_entries, eval);

/*
* No need to worry about races with clearing out the commit.
Expand Down

0 comments on commit 2182c98

Please sign in to comment.