-
Notifications
You must be signed in to change notification settings - Fork 33
adsprpc: map the persist buffer outside the mutex #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
Currently, allocation and mapping of buffer is happening inside mutex.If mapping on one session gets stuck on DSP,other sessions will not be able to acquire the mutex and will get hung while getting spawned. Map the buffer outside the mutex. Signed-off-by: Patan Saddam <[email protected]>
} | ||
locked = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
@@ -3947,6 +3947,7 @@ static int domain_init(int domain, int *dev) { | |||
} | |||
VERIFY(AEE_SUCCESS == (nErr = fastrpc_mem_open(domain))); | |||
VERIFY(AEE_SUCCESS == (nErr = apps_mem_init(domain))); | |||
fastrpc_log_init(domain, dsppd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide details about the variable being passed in this function? Is it a global variable, or might its declaration be missing?
* through script. */ | ||
if ((dsppd == USERPD || dsppd == AUDIO_STATICPD || | ||
dsppd == SENSORS_STATICPD) && debug_build_type) { | ||
pthread_mutex_lock(&persist_buf.mut); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add error handling for the pthread_mutex_lock(mut) failure case? It’s important to ensure that the function gracefully handles any potential locking failures to maintain robustness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are handing code gracefully when pthread_mutex_lock fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/fastrpc_apps_user.c:3950 dsppd declaration missing
Currently, allocation and mapping of buffer is happening inside mutex.If mapping on one session gets stuck on DSP,other sessions will not be able to acquire the mutex and will get hung while getting spawned. Map the buffer outside the mutex.