lkml.org 
[lkml]   [2006]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectclarity on kref needed.
Date
From

Dear All,

I have gone through kref and am planning to implement then in my usb driver.
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.

kref_put(&dev->kref);
increment the refcount.

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.
Is it correct? I mean, when is the mem_release () called i.e. when the refcount is '0' or '1'.

Thanks & Regards,
Mukund Jampala

-
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/

\
 
 \ /
  Last update: 2006-01-18 08:08    [W:0.034 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site