lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] perf_counter: unify and fix delayed counter wakeup
Peter Zijlstra writes:

> +void perf_counter_wakeup(struct perf_counter *counter)
> +{
> + struct perf_mmap_data *data;
> +
> + rcu_read_lock();
> + data = rcu_dereference(counter->data);
> + if (data) {
> + (void)atomic_xchg(&data->wakeup, POLL_IN);

Really just a nit, but how is this atomic_xchg any different from
atomic_set(&data->wakeup, POLL_IN) aside from being slower?

Paul.


\
 
 \ /
  Last update: 2009-03-31 07:49    [W:0.146 / U:3.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site