[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160119200722.GD6357@twins.programming.kicks-ass.net>
Date: Tue, 19 Jan 2016 21:07:22 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
vince@...ter.net, eranian@...gle.com,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Jiri Olsa <jolsa@...nel.org>
Subject: Re: [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;
> }
Powered by blists - more mailing lists