mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kref: Add a kref_sub function
Makes it possible to optimize batched multiple unrefs. Initial user will be drivers/gpu/ttm which accumulates unrefs to be processed outside of atomic code. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
d6ea88865d
commit
ecf7ace9a8
2 changed files with 32 additions and 0 deletions
|
@ -24,5 +24,7 @@ struct kref {
|
|||
void kref_init(struct kref *kref);
|
||||
void kref_get(struct kref *kref);
|
||||
int kref_put(struct kref *kref, void (*release) (struct kref *kref));
|
||||
int kref_sub(struct kref *kref, unsigned int count,
|
||||
void (*release) (struct kref *kref));
|
||||
|
||||
#endif /* _KREF_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue