dsp-kernel: Additon of krefs to fastrpc process structure

Add krefs reference counters to fastrpc process objects.
Process structures are used in multiple places and passed
around. Maintaining krefs helps ensure that the release routine
for structure is called after last reference to the pointer
is done.

Co-developed-by: Abhinav Parihar <quic_parihar@quicinc.com>
Change-Id: I5fd35af3c5581bf69ebfddf56951d76d9a2d10fb
Signed-off-by: Ansa Ahmed <quic_ansa@quicinc.com>
This commit is contained in:
Ansa Ahmed
2024-04-03 09:23:35 +05:30
parent 8f36f9526b
commit 963c25dc25
2 changed files with 109 additions and 24 deletions

View File

@@ -845,6 +845,7 @@ struct fastrpc_file {
struct fastrpc_ctx_lst clst;
struct fastrpc_session_ctx *sctx;
struct fastrpc_buf *init_mem;
struct kref refcount;
/* No. of persistent headers */
unsigned int num_pers_hdrs;