mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add support for kref_read() function in the LinuxKPI.
MFC after: 1 week Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies
This commit is contained in:
parent
13a27c3b43
commit
e35dc5149d
1 changed files with 7 additions and 0 deletions
|
|
@ -52,6 +52,13 @@ kref_init(struct kref *kref)
|
|||
refcount_init(&kref->refcount.counter, 1);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
kref_read(const struct kref *kref)
|
||||
{
|
||||
|
||||
return (atomic_read(&kref->refcount));
|
||||
}
|
||||
|
||||
static inline void
|
||||
kref_get(struct kref *kref)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue