[srsran-users] possible bur w/r to enb mtch_cvar mutex locking

Justin Tallon justin.tallon at srs.io
Tue Sep 6 13:59:01 UTC 2022


Hey Joe!

Thanks for discovering this, additionally I am currently reviewing the
issue you created #936.

I will aim to push a fix for both of these issues soon.

Thanks,
Justin

Justin Tallon

Engineering Manager

Software Radio Systems
justin at srs.io
www.srs.io
Barcelona, Spain
[image: twitter] <https://twitter.com/srssystems>
[image: linkedin] <https://www.linkedin.com/in/justin-tallon-71807136/>


On Tue, Sep 6, 2022 at 3:22 PM J Giovatto <jgiovatto at adjacentlink.com>
wrote:

> Hi Folks,
>
> I ran across this case where pthread_cond_wait was used w/o the typical
> pthread_mutex_lock/unlock calls
>
> diff --git a/srsenb/src/phy/phy_common.cc b/srsenb/src/phy/phy_common.cc
> index 4d8a5428e..f08812ccd 100644
> --- a/srsenb/src/phy/phy_common.cc
> +++ b/srsenb/src/phy/phy_common.cc
> @@ -304,9 +304,11 @@ bool
> phy_common::is_mch_subframe(srsran_mbsfn_cfg_t* cfg, uint32_t phy_tti)
>             uint32_t mbsfn_per_frame =
> mbsfn.mcch.pmch_info_list[0].sf_alloc_end /
> +enum_to_number(mbsfn.mcch.pmch_info_list[0].mch_sched_period);
>             uint32_t sf_alloc_idx = frame_alloc_idx * mbsfn_per_frame +
> ((sf < 4) ? sf - 1 : sf - 3);
> +          pthread_mutex_lock(&mtch_mutex);
>             while (!have_mtch_stop) {
>               pthread_cond_wait(&mtch_cvar, &mtch_mutex);
>             }
> +          pthread_mutex_unlock(&mtch_mutex);
>             for (uint32_t i = 0; i < mbsfn.mcch.nof_pmch_info; i++) {
>               if (sf_alloc_idx <= mch_period_stop) {
>                 cfg->mbsfn_mcs = mbsfn.mcch.pmch_info_list[i].data_mcs;
>
>
> Thoughts ?
>
>
> Joe
>
> _______________________________________________
> srsran-users mailing list
> srsran-users at lists.srsran.com
> https://lists.srsran.com/mailman/listinfo/srsran-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20220906/65574cd8/attachment.htm>


More information about the srsran-users mailing list