lkml.org 
[lkml]   [2016]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] perf: Synchronously cleanup child events
On Tue, Jan 19, 2016 at 05:12:34PM +0200, Alexander Shishkin wrote:
> +static bool put_event_last(struct perf_event *event)
> {
> + if (atomic_long_cmpxchg(&event->refcount, 1, 0)) {

if (atomic_long_cmpxchg(&event->refcount, 1, 0) == 1) {

> + __put_event(event);
> + return true;
> + }
> +
> + return false;
> }

\
 
 \ /
  Last update: 2016-01-19 21:41    [W:0.069 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site