Hi Anders,

No, we can't.
If we are going to remove ncslpg_*, then we need another ticket.

Thanks,
Zoran

-----Original Message-----
From: Anders Widell 
Sent: den 10 januari 2017 15:10
To: Zoran Milinkovic <zoran.milinko...@ericsson.com>; ramesh.bet...@oracle.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1 of 1] base: fix decrementing reference counter in 
ncs_tmr_start and ncs_tmr_remaining [#2249]

Hi!

To me, it looks like the object gl_tcb.persist and all functions accessing it 
(ncslpg_create, ncslpg_take, ncslpg_give) is just dead code. Can we just remove 
it?

regards,

Anders Widell


On 01/04/2017 10:48 AM, Zoran Milinkovic wrote:
>   src/base/sysf_tmr.c |  3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
>
> Add missing decrementing reference counter 'gl_tcb.persist' in 
> ncs_tmr_start() and ncs_tmr_remaining()
>
> diff --git a/src/base/sysf_tmr.c b/src/base/sysf_tmr.c
> --- a/src/base/sysf_tmr.c
> +++ b/src/base/sysf_tmr.c
> @@ -720,6 +720,7 @@ tmr_t ncs_tmr_start(tmr_t tid, int64_t t
>       if (rc == NCSCC_RC_FAILURE) {
>               /* Free the timer created */
>               m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE);
> +             ncslpg_give(&gl_tcb.persist, 0);
>               return NULL;
>       }
>   #if ENABLE_SYSLOG_TMR_STATS
> @@ -735,6 +736,7 @@ tmr_t ncs_tmr_start(tmr_t tid, int64_t t
>                       /* We would never reach here! */
>                       m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE);
>                       m_LEAP_DBG_SINK_VOID;
> +                     ncslpg_give(&gl_tcb.persist, 0);
>                       return NULL;
>               }
>       }
> @@ -904,6 +906,7 @@ int64_t ncs_tmr_remaining(tmr_t tmrID, i
>       m_NCS_LOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE);    /* critical 
> region START */
>       if (!TMR_TEST_STATE(tmr, TMR_STATE_START)) {
>               m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE);  /* 
> critical region START */
> +             ncslpg_give(&gl_tcb.persist, 0);
>               return NCSCC_RC_FAILURE;
>       }
>       m_NCS_UNLOCK(&gl_tcb.safe.enter_lock, NCS_LOCK_WRITE);  /* critical 
> region START */
>
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's 
> most engaging tech sites, SlashDot.org! http://sdm.link/slashdot 
> _______________________________________________
> Opensaf-devel mailing list
> Opensaf-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensaf-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to