[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinnVv5wE0U=RrSKR40-u88VC8_XMctx=X0O3Tg7@mail.gmail.com>
Date: Wed, 5 Jan 2011 17:43:22 +0200
From: Alexey Dobriyan <adobriyan@...il.com>
To: Jerome Marchand <jmarchan@...hat.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Vivek Goyal <vgoyal@...hat.com>,
Jens Axboe <jaxboe@...ionio.com>,
Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <greg@...ah.com>
Subject: Re: [PATCH 1/2 v2] kref: add kref_test_and_get
On Wed, Jan 5, 2011 at 5:02 PM, Jerome Marchand <jmarchan@...hat.com> wrote:
> Add kref_test_and_get() function, which atomically add a reference only if
> refcount is not zero. This prevent to add a reference to an object that is
> already being removed.
Is kref supposed to be used only for "toy" structures where you aren't
expected to do get possibly dead object?
--
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