Re: [patch 22/50] rbtree: Split out the rbtree type definitions

From: Arnaldo
Date: Wed Jul 14 2021 - 05:31:43 EST




On July 14, 2021 6:24:16 AM GMT-03:00, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>On Tue, Jul 13, 2021 at 05:11:16PM +0200, Thomas Gleixner wrote:
>> From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
>>
>> rtmutex.h needs the definition of struct rb_root_cached. rbtree.h
>includes
>> kernel.h which includes spinlock.h. That works nicely for non-RT
>enabled
>> kernels, but on RT enabled kernels spinlocks are based on rtmutexes
>which
>> creates another circular header dependency as spinlocks.h will
>require
>> rtmutex.h.
>>
>> Split out the type definitions and move them into their own header
>file so
>> the rtmutex header can include just those.
>>
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
>> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> ---
>> include/linux/rbtree.h | 30 +-----------------------------
>> include/linux/rbtree_types.h | 34 ++++++++++++++++++++++++++++++++++
>
>This will mess up the tools/include/linux/ copy of these headers...

Please don't worry about that, it's a copy, done that way to avoid burdening kernel developers, I'll check and adapt :-)

- Arnaldo

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.