[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090817074820.3585206b@lxorguk.ukuu.org.uk>
Date: Mon, 17 Aug 2009 07:48:20 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Stefani Seibold <stefani@...bold.net>,
linux-kernel <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Andi Kleen <andi@...stfloor.org>,
Amerigo Wang <xiyou.wangcong@...il.com>,
Joe Perches <joe@...ches.com>
Subject: Re: [PATCH 2/7] kfifo: move out spinlock
> kfifo has no business assuming that the caller wants to use
> spin_lock() locking.
>
> If we want to add wrapper helpers around kfifo to reduce code
> duplication in callers, and if one of those wrapper helpers provides
> spinlock-based locking then fine.
Those wrappers happen to be called kfifo_get and kfifo_put
> But the happens-to-use-spin_lock functions shouldn't be called
> kfifo_get(), because that steals namespace from the unlocked functions,
> and makes the naming for the happens-to-use-mutex_lock functions look
> weird.
All over the kernel unlocked function versions have a leading _ name.
It's the kernel convention.
The other thing I must say I dislike about these patches is the
gratuitious 'let's rename all the functions' approach it takes. The kfifo
API is documented, used and random API of the year type changes mess
stuff up and cause unneeded churn.
The implementation itself is a really really nice idea.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists