[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130812171208.7dde2569@nehalam.linuxnetplumber.net>
Date: Mon, 12 Aug 2013 17:12:08 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: "Dmitry Kravkov" <dmitry@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, eilong@...adcom.com,
"Ariel Elior" <ariele@...adcom.com>
Subject: Re: [PATCH net v5 1/5] bnx2x: protect different statistics flows
On Tue, 13 Aug 2013 02:24:59 +0300
"Dmitry Kravkov" <dmitry@...adcom.com> wrote:
> + bool stats_started;
> + struct semaphore stats_sema;
Is there a reason to use a counting semaphore? Do you expect it to
be held across user process boundary? or want count > 1?
Use of semaphores as a locking primitive is discouraged,
instead us a mutex.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists