A potential Xenomai Mutex issue

Jan Kiszka jan.kiszka at siemens.com
Fri Aug 23 20:17:41 CEST 2019


On 23.08.19 19:27, DIAO, Hanson (DI PA CI RC R&D SW2) wrote:
> No, the thread was not doing any migrations to secondary mode.
> 

Then I would suggest to use a debugger in order to step through this fairly 
simple, nicely single-threaded case. That should reveal if you are really taking 
the same lock or why rt_mutex_lock decides to not increment lockcnt.

Jan

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka at siemens.com>
> Sent: Friday, August 23, 2019 12:19 PM
> To: DIAO, Hanson (DI PA CI RC R&D SW2) <hanson.diao at siemens.com>
> Cc: xenomai at xenomai.org
> Subject: Re: A potential Xenomai Mutex issue
> 
> On 23.08.19 17:49, DIAO, Hanson (DI PA CI RC R&D SW2) wrote:
>> Hi Jan,
>>
>> Thank you for your reply. Please see my following comments. Thank you so much.
>>
>>
>> For the issue 2 the test case is very simple. The lock sequence is as below. After ReadReg function I checked the lockcnt. The lockcnt is 1.
>> Int writeReg()
>> {
>>        SMILock();
>>        ReadReg();
>>        ......
>>        SMIUnlock();
>> }
>>
>> Int ReadReg()
>> {
>>        SMILock();
>>        /*  Check the lockcnt here. It is still 1, should be 2 */
>>        ........
>>        ......
>>        SMIUnlock();
>> }
> 
> Is the thread doing any migrations to secondary mode between the entry of writeReg and the checking of lockcnt?
> 
> Jan
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list