[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <585B3346.2020001@amd.com>
Date: Thu, 22 Dec 2016 09:58:30 +0800
From: zhoucm1 <david1.zhou@....com>
To: Nicolai Hähnle <nhaehnle@...il.com>,
<linux-kernel@...r.kernel.org>
CC: Maarten Lankhorst <dev@...ankhorst.nl>,
Nicolai Hähnle <Nicolai.Haehnle@....com>,
Peter Zijlstra <peterz@...radead.org>,
<dri-devel@...ts.freedesktop.org>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 03/12] locking/ww_mutex: Extract stamp comparison to
__ww_mutex_stamp_after
On 2016年12月22日 02:46, Nicolai Hähnle wrote:
> +static inline bool __sched
> +__ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
> +{
> + return a->stamp - b->stamp <= LONG_MAX &&
> + (a->stamp != b->stamp || a > b);
I want to ask a stupid question, why a can compare with b? They are
pointers of structure. Isn't stamp enough for compare?
Thanks,
David Zhou
Powered by blists - more mailing lists