From: "Mukund JB." <mukundjb@esntechnologies.co.in>
To: "Greg KH" <greg@kroah.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: clarity on kref needed.
Date: Thu, 19 Jan 2006 10:15:51 +0530 [thread overview]
Message-ID: <3AEC1E10243A314391FE9C01CD65429B28BF0D@mail.esn.co.in> (raw)
> > I have gone through kref and am planning to implement then
> in my usb driver.
>
> What kind of usb driver?
It is a finger print authentication USB driver. it doesn ot do the authgentication but transports data to the application which really does some processing.
No, I did not find any Documentation/kref.txt.
But I have read about kred in the link below:
http://developer.osdl.org/dev/robustmutexes/src/fusyn.hg/Documentation/kref.txt
Is kref depricated because I find nothing related to it in linux/Documentation/?
Thanks & Regards,
Mukund Jampala
>
> > please terminate my misconceptions if any by correcting the
> statements below.
> >
> > In the call below:
> > kref_init(&dev->kref);
> > sets the refcount in the kref to 1.
>
> Yes.
>
> > kref_put(&dev->kref);
> > increment the refcount.
>
> Hm, don't you mean "kref_get()" here? If so, yes, that is correct.
>
> > kref_put(&dev->kref, mem_release );
> > What I understand is when the refcount falls back to '1', only then
> > the mem_release() function will be called.
>
> No, when it falls to 0 it will be called.
>
> > Is it correct? I mean, when is the mem_release () called
> i.e. when the
> > refcount is '0' or '1'.
>
> 0. There's an OLS paper from a few years ago that describes kref in
> detail, as well as the in-kernel documentation of it (see the file
> Documentation/kref.txt). Did you read that?
>
> thanks,
>
> greg k-h
>
next reply other threads:[~2006-01-19 4:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 4:45 Mukund JB. [this message]
2006-01-19 5:03 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2006-01-19 7:00 Mukund JB.
2006-01-19 15:55 ` Greg KH
2006-01-19 5:05 Mukund JB.
2006-01-19 5:33 ` Greg KH
2006-01-18 6:57 Mukund JB.
2006-01-18 15:51 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AEC1E10243A314391FE9C01CD65429B28BF0D@mail.esn.co.in \
--to=mukundjb@esntechnologies.co.in \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®