[Xenomai] a question about rt_mutex_acquire()

Philippe Gerum rpm at xenomai.org
Tue Mar 18 16:47:59 CET 2014


On 03/18/2014 04:42 PM, ali hagigat wrote:
> On 3/11/14, ali hagigat <hagigatali at gmail.com> wrote:
>> On 3/10/14, Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org> wrote:
>>> On 03/10/2014 04:01 PM, ali hagigat wrote:
>>>> rt_mutex_acquire() creates a segmentation fault, why?
>>>
>>> Because rt_mutex_create failed? Otherwise we would see the message
>>> "success"?
>>>
>>> Is this a game? Or are you using Xenomai for a real project?
>>>
>>>
>>> --
>>> 					    Gilles.
>>>
>>
>> I am just testing Xenomai. If i comment rt_mutex_acquire() I see the
>> message, "success", and a real time mutex is created correctly.  by
>> uncommenting "rt_mutex_acquire()" there is a segmentation fault.
>>
>
> Why there is a segmentation fault?
>

Because rt_mutex_acquire() runs before rt_mutex_create(). Check your 
code to find out why.

-- 
Philippe.




More information about the Xenomai mailing list