Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589439
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature |
| Date | 2017-02-28 14:20 +0100 |
| Message-ID | <tfPR9-4Up-35@gated-at.bofh.it> (permalink) |
| References | <t0YjD-4z4-5@gated-at.bofh.it> <t0Ytl-4D1-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> +#ifdef CONFIG_LOCKDEP_CROSSRELEASE
> +
> +#define idx(t) ((t)->xhlock_idx)
> +#define idx_prev(i) ((i) ? (i) - 1 : MAX_XHLOCKS_NR - 1)
> +#define idx_next(i) (((i) + 1) % MAX_XHLOCKS_NR)
Note that:
#define idx_prev(i) (((i) - 1) % MAX_XHLOCKS_NR)
#define idx_next(i) (((i) + 1) % MAX_XHLOCKS_NR)
is more symmetric and easier to understand.
> +
> +/* For easy access to xhlock */
> +#define xhlock(t, i) ((t)->xhlocks + (i))
> +#define xhlock_prev(t, l) xhlock(t, idx_prev((l) - (t)->xhlocks))
> +#define xhlock_curr(t) xhlock(t, idx(t))
So these result in an xhlock pointer
> +#define xhlock_incr(t) ({idx(t) = idx_next(idx(t));})
This does not; which is confusing seeing how they share the same
namespace; also incr is weird.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-02-28 14:20 +0100
Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-02-28 15:20 +0100
Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature Peter Zijlstra <peterz@infradead.org> - 2017-02-28 19:40 +0100
Re: [PATCH v5 06/13] lockdep: Implement crossrelease feature Byungchul Park <byungchul.park@lge.com> - 2017-03-01 06:30 +0100
csiph-web