Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965248AbbKDKei (ORCPT ); Wed, 4 Nov 2015 05:34:38 -0500 Received: from www.linutronix.de ([62.245.132.108]:48796 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964914AbbKDKeg (ORCPT ); Wed, 4 Nov 2015 05:34:36 -0500 Date: Wed, 4 Nov 2015 11:33:51 +0100 (CET) From: Thomas Gleixner To: Daniel Wagner cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, "Peter Zijlstra (Intel)" , Paul Gortmaker , Marcelo Tosatti , Paolo Bonzini , "Paul E. McKenney" Subject: Re: [PATCH v3 1/4] wait.[ch]: Introduce the simple waitqueue (swait) implementation In-Reply-To: <1445326090-1698-2-git-send-email-daniel.wagner@bmw-carit.de> Message-ID: References: <1445326090-1698-1-git-send-email-daniel.wagner@bmw-carit.de> <1445326090-1698-2-git-send-email-daniel.wagner@bmw-carit.de> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1631 Lines: 48 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 - I really prefer new infrastructure to have a consistent prefix which reflects the "subsystem". That's simpler to read and simpler to grep for. > +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. 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/