> -----Original Message----- > From: Hans Nordebäck [mailto:[email protected]] > Sent: den 13 januari 2014 13:33 > To: Hans Nordebäck; Hans Feldt > Cc: [email protected] > Subject: Re: [devel] [PATCH 1 of 2] amfnd: remove unneeded lock [#713] > > But why are not avnd_stop_tmr not updated as avnd_start_tmr?/BR HansN Because I missed them I guess...
Will remove before push /HansF > > -----Original Message----- > From: Hans Nordebäck [mailto:[email protected]] > Sent: den 13 januari 2014 13:09 > To: Hans Feldt > Cc: [email protected] > Subject: Re: [devel] [PATCH 1 of 2] amfnd: remove unneeded lock [#713] > > Ack, (code review)/BR HansN > On 01/10/14 15:43, Hans Feldt wrote: > > osaf/services/saf/amf/amfnd/include/avnd_cb.h | 1 - > > osaf/services/saf/amf/amfnd/main.cc | 10 ---------- > > osaf/services/saf/amf/amfnd/mbcsv.cc | 4 ---- > > osaf/services/saf/amf/amfnd/tmr.cc | 12 ++++-------- > > 4 files changed, 4 insertions(+), 23 deletions(-) > > > > > > diff --git a/osaf/services/saf/amf/amfnd/include/avnd_cb.h > > b/osaf/services/saf/amf/amfnd/include/avnd_cb.h > > --- a/osaf/services/saf/amf/amfnd/include/avnd_cb.h > > +++ b/osaf/services/saf/amf/amfnd/include/avnd_cb.h > > @@ -52,7 +52,6 @@ typedef struct avnd_cb_tag { > > bool is_avd_down; /* Temp: Indicates if AvD went down */ > > > > /* cb related params */ > > - NCS_LOCK lock; /* cb lock */ > > NCS_LOCK mon_lock; /* PID monitor lock */ > > > > /* external interface related params */ diff --git > > a/osaf/services/saf/amf/amfnd/main.cc > > b/osaf/services/saf/amf/amfnd/main.cc > > --- a/osaf/services/saf/amf/amfnd/main.cc > > +++ b/osaf/services/saf/amf/amfnd/main.cc > > @@ -323,10 +323,6 @@ AVND_CB *avnd_cb_create() > > } > > } > > > > - /* initialize the AvND cb lock */ > > - m_NCS_LOCK_INIT(&cb->lock); > > - TRACE_1("Initialized the AvND lock"); > > - > > /* initialize the PID monitor lock */ > > m_NCS_LOCK_INIT(&cb->mon_lock); > > > > @@ -660,9 +656,6 @@ void avnd_evt_process(AVND_EVT *evt) > > /* log the event reception */ > > TRACE("Evt type:%u",evt->type); > > > > - /* acquire cb write lock */ > > - m_NCS_LOCK(&cb->lock, NCS_LOCK_WRITE); > > - > > /* invoke the event handler */ > > rc = g_avnd_func_list[evt->type] (cb, evt); > > > > @@ -670,9 +663,6 @@ void avnd_evt_process(AVND_EVT *evt) > > m_AVND_SEND_CKPT_UPDT_SYNC(cb, NCS_MBCSV_ACT_UPDATE, 0); > > } > > > > - /* release cb write lock */ > > - m_NCS_UNLOCK(&cb->lock, NCS_LOCK_WRITE); > > - > > /* log the result of event processing */ > > TRACE("Evt Type:%u %s",evt->type,((rc == NCSCC_RC_SUCCESS) ? > > "success" : "failure")); > > > > diff --git a/osaf/services/saf/amf/amfnd/mbcsv.cc > > b/osaf/services/saf/amf/amfnd/mbcsv.cc > > --- a/osaf/services/saf/amf/amfnd/mbcsv.cc > > +++ b/osaf/services/saf/amf/amfnd/mbcsv.cc > > @@ -171,8 +171,6 @@ static uint32_t avnd_mbcsv_cb(NCS_MBCSV_ > > return NCSCC_RC_FAILURE; > > } > > > > - m_NCS_LOCK(&cb->lock, NCS_LOCK_WRITE); > > - > > switch (arg->i_op) { > > case NCS_MBCSV_CBOP_ENC: > > status = avnd_mbcsv_process_enc_cb(cb, arg); @@ -200,8 +198,6 @@ > > static uint32_t avnd_mbcsv_cb(NCS_MBCSV_ > > break; > > } > > > > - m_NCS_UNLOCK(&cb->lock, NCS_LOCK_WRITE); > > - > > TRACE_LEAVE2("%u", status); > > return status; > > } > > diff --git a/osaf/services/saf/amf/amfnd/tmr.cc > > b/osaf/services/saf/amf/amfnd/tmr.cc > > --- a/osaf/services/saf/amf/amfnd/tmr.cc > > +++ b/osaf/services/saf/amf/amfnd/tmr.cc > > @@ -70,27 +70,23 @@ static const char *tmr_type[] = > > > > *****************************************************************************/ > > uint32_t avnd_start_tmr(AVND_CB *cb, AVND_TMR *tmr, AVND_TMR_TYPE type, > > SaTimeT period, uint32_t uarg) > > { > > - m_INIT_CRITICAL; > > - > > if (AVND_TMR_MAX <= tmr->type) > > return NCSCC_RC_FAILURE; > > > > if (tmr->tmr_id == TMR_T_NULL) { > > tmr->type = type; > > - // m_NCS_TMR_CREATE(tmr->tmr_id, period / > > AVSV_NANOSEC_TO_LEAPTM, avnd_tmr_exp, (void *)tmr); > > - tmr->tmr_id = ncs_tmr_alloc(const_cast<char*>(__FILE__), > > __LINE__); > > + tmr->tmr_id = ncs_tmr_alloc(const_cast<char*>(__FILE__), > > __LINE__); > > } > > > > - m_START_CRITICAL; > > if (tmr->is_active == true) { > > m_NCS_TMR_STOP(tmr->tmr_id); > > tmr->is_active = false; > > } > > tmr->opq_hdl = uarg; > > - //m_NCS_TMR_START(tmr->tmr_id, (uint32_t)(period / > > AVSV_NANOSEC_TO_LEAPTM), avnd_tmr_exp, (void *)tmr); > > - tmr->tmr_id = ncs_tmr_start(tmr->tmr_id, (uint32_t)(period / > > AVSV_NANOSEC_TO_LEAPTM), avnd_tmr_exp, tmr, > const_cast<char*>(__FILE__), __LINE__); > > + tmr->tmr_id = ncs_tmr_start(tmr->tmr_id, > > + (uint32_t)(period / AVSV_NANOSEC_TO_LEAPTM), avnd_tmr_exp, tmr, > > + const_cast<char*>(__FILE__), __LINE__); > > tmr->is_active = true; > > - m_END_CRITICAL; > > > > if (TMR_T_NULL == tmr->tmr_id) > > return NCSCC_RC_FAILURE; > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical > Workloads, Development Environments & Everything In > Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Opensaf-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensaf-devel > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Opensaf-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
