Implementing priority in registers access task

In reply to dave_59:

Thanks for Response Dave. Surprisingly it works with Synopsys Tool on EDA Playground. Other approach I am thinking would be to use two separate semaphore and priority base selection. Any suggestions please as I am not convinced if that is the best idea.

Best Regards,
Rohit