Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

From: Dmitry Vyukov
Date: Wed Mar 29 2017 - 04:21:49 EST


On Tue, Mar 28, 2017 at 11:35 PM, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Tue, Mar 28, 2017 at 06:15:41PM +0200, Dmitry Vyukov wrote:
>> The new header allows to wrap per-arch atomic operations
>> and add common functionality to all of them.
>
> Why a new header instead of putting this in linux/atomic.h?


Only a subset of archs include this header. If we pre-include it for
all arches without changing their atomic.h, we will break build. We of
course play some tricks with preprocessor.
It's also large enough to put into a separate header IMO.
Also a reasonable question: why put it into linux/atomic.h instead of
a new header? :)