Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1699793
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] futex: split PI support to a file of its own |
| Date | 2017-07-31 10:00 +0200 |
| Message-ID | <u9dMl-3vs-5@gated-at.bofh.it> (permalink) |
| References | <u8rRn-5Cw-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 29 Jul 2017, Nicolas Pitre wrote: > Split out the priority inheritance support to a file of its own > to make futex.c much smaller, easier to understand and, hopefully, > to maintain. This also makes it easy to preserve basic futex support > and compile out the PI support when RT mutexes are not available. I can see your motivation to compile out PI support, which is why you worked on this in the first place. But I really do not agree with your reasoning about easier to understand and maintain. I have the dubious pleasure to stare into that code on a regular base. PI and non PI share a lot of code and it's really not helping to have two separate files to stare at. That makes following the PI code even harder than it is already. So I rather like to see that PI code in an #ifdef block and not split out into its own file. > Signed-off-by: Nicolas Pitre <nico@linaro.org> Please provide a diffstat along with the patch next time. > diff --git a/include/linux/futex.h b/include/linux/futex.h > +#ifdef CONFIG_FUTEX_PI > +#include "futex_pi.c" > +#else > +#define get_pi_state(...) > +#define put_pi_state(...) > +#define refill_pi_state_cache() false > +#define lookup_pi_state(...) -ENOSYS > +#define rt_mutex_start_proxy_lock(...) -ENOSYS > +#define requeue_pi_wake_futex(...) > +#define futex_proxy_trylock_atomic(...) -ENOSYS > +#define futex_lock_pi(...) -ENOSYS > +#define futex_unlock_pi(...) -ENOSYS > +#define futex_wait_requeue_pi(...) -ENOSYS > +#endif Bah, no. We use static inlines as stubs whereever it's possible. Using macros is just a sloppy hackery. Thanks, tglx
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] futex: split PI support to a file of its own Thomas Gleixner <tglx@linutronix.de> - 2017-07-31 10:00 +0200 Re: [PATCH] futex: split PI support to a file of its own Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-08-01 06:30 +0200
csiph-web