Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272086 > unrolled thread
| Started by | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| First post | 2015-11-18 11:40 +0100 |
| Last post | 2015-11-18 16:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 1/4] wait.[ch]: Introduce the simple waitqueue (swait) implementation Peter Zijlstra <peterz@infradead.org> - 2015-11-18 11:40 +0100
Re: [PATCH v3 1/4] wait.[ch]: Introduce the simple waitqueue (swait) implementation Thomas Gleixner <tglx@linutronix.de> - 2015-11-18 16:10 +0100
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2015-11-18 11:40 +0100 |
| Subject | Re: [PATCH v3 1/4] wait.[ch]: Introduce the simple waitqueue (swait) implementation |
| Message-ID | <qw8jD-1Fc-11@gated-at.bofh.it> |
On Wed, Nov 04, 2015 at 11:33:51AM +0100, Thomas Gleixner wrote: > On Tue, 20 Oct 2015, Daniel Wagner wrote: > > + > > +extern void swake_up(struct swait_queue_head *q); > > +extern void swake_up_all(struct swait_queue_head *q); > > +extern void swake_up_locked(struct swait_queue_head *q); > > I intentionally named these functions swait_wake* in my initial > implementation for two reasons: > > - typoing wake_up vs. swake_up only emits a compiler warning and does > not break the build -Werror ftw, but yes good point. > - I really prefer new infrastructure to have a consistent prefix > which reflects the "subsystem". That's simpler to read and simpler > to grep for. I generally agree, but seeing how this is really an 'extension' of existing infrastructure, I went along with this. > > +extern void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait); > > +extern void prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait, int state); > > +extern long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state); > > + > > +extern void __finish_swait(struct swait_queue_head *q, struct swait_queue *wait); > > +extern void finish_swait(struct swait_queue_head *q, struct swait_queue *wait); > > Can we please go with the original names? > > swait_prepare() > swait_prepare_locked() > swait_finish() > swait_finish_locked() > > Hmm? > > > +#define swait_event(wq, condition) \ > > Here we have the same swait vs. wait problem as above. So either we > come up with a slightly different name or have an explicit type check > in __swait_event event. Type check macros, otherwise you break the naming scheme you so adamantly push for (or end up with horrid stuff like swait_wait_event()). I suppose we can do the rename as you propose to avoid single letter typoes, but it does bug me to have two nearly identical bits of infra with such dissimilar names. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-11-18 16:10 +0100 |
| Message-ID | <qwcwV-4zt-1@gated-at.bofh.it> |
| In reply to | #1272086 |
On Wed, 18 Nov 2015, Peter Zijlstra wrote: > I suppose we can do the rename as you propose to avoid single letter > typoes, but it does bug me to have two nearly identical bits of infra > with such dissimilar names. I can see your point, but OTOH the existing interface is ugly and copying it does not make it any better. But I'm really not religious about that. Up to you :) Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web