- **status**: review --> fixed
- **Comment**:
changeset: 6797:84dee6e50f1e
branch: opensaf-4.5.x
user: A V Mahesh <[email protected]>
date: Mon Sep 14 09:17:29 2015 +0530
files: osaf/libs/core/mds/mds_c_sndrcv.c
description:
mds: Optimized the mds mutex locks code [#1338]
Made centralized locks & unlock wherever possible,
for better debugging mds code and to reduces scope of locks & unlock code errors
changeset: 6798:de765110343d
branch: opensaf-4.6.x
parent: 6795:b0bbdaadfda1
user: A V Mahesh <[email protected]>
date: Mon Sep 14 09:17:57 2015 +0530
files: osaf/libs/core/mds/mds_c_sndrcv.c
description:
mds: Optimized the mds mutex locks code [#1338]
Made centralized locks & unlock wherever possible,
for better debugging mds code and to reduces scope of locks & unlock code errors
changeset: 6799:93e72338e78f
tag: tip
parent: 6794:2611051a6ffe
user: A V Mahesh <[email protected]>
date: Mon Sep 14 09:18:14 2015 +0530
files: osaf/libs/core/mds/mds_c_sndrcv.c
description:
mds: Optimized the mds mutex locks code [#1338]
Made centralized locks & unlock wherever possible,
for better debugging mds code and to reduces scope of locks & unlock code errors
---
** [tickets:#1338] mds : Optimized the mds_library_mutex locks for better core
readability**
**Status:** fixed
**Milestone:** 4.7.FC
**Created:** Fri Apr 24, 2015 05:16 AM UTC by A V Mahesh (AVM)
**Last Updated:** Wed Aug 26, 2015 08:47 AM UTC
**Owner:** A V Mahesh (AVM)
Now in mds code mds_library_mutex unlock/lock was taken before and after
function
mds_mcm_time_wait() , and this is done acroos the code , if we move this
mds_library_mutex unlock/lock in side the fucntion mds_mcm_time_wait() , code
will have more readability and some code cleanup.
Example changes :
@@ -2435,9 +2438,7 @@ static uint32_t mcm_pvt_normal_svc_sndrs
fr_svc_id, to_svc_id, to_dest);
return status;
} else {
- osaf_mutex_unlock_ordie(&gl_mds_library_mutex);
if (NCSCC_RC_SUCCESS != mds_mcm_time_wait(&sync_queue->sel_obj,
req->info.sndrsp.i_time_to_wait)) {
- osaf_mutex_lock_ordie(&gl_mds_library_mutex);
/* This is for response for local dest */
if (sync_queue->status == NCSCC_RC_SUCCESS) {
/* sucess case */
@@ -2458,7 +2459,6 @@ static uint32_t mcm_pvt_normal_svc_sndrs
mcm_pvt_del_sync_send_entry((MDS_PWE_HDL)env_hdl,
fr_svc_id, xch_id, req->i_sendtype, 0);
return NCSCC_RC_REQ_TIMOUT;
} else {
- osaf_mutex_lock_ordie(&gl_mds_library_mutex);
if (NCSCC_RC_SUCCESS !=
mds_check_for_mds_existence(&sync_queue->sel_obj, env_hdl, fr_svc_id,
to_svc_id)) {
m_MDS_LOG_INFO("MDS_SND_RCV: MDS entry doesnt
exist\n");
@@ -2549,15 +2549,18 @@ static uint32_t mds_await_active_tbl_del
static uint32_t mds_mcm_time_wait(NCS_SEL_OBJ *sel_obj, uint32_t time_val)
{
+ osaf_mutex_unlock_ordie(&gl_mds_library_mutex);
/* Now wait for the response to come */
int count = osaf_poll_one_fd(sel_obj->rmv_obj,
time_val == 0 ? -1 : (time_val * 10));
+ osaf_mutex_lock_ordie(&gl_mds_library_mutex);
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets