All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] a question about rt_mutex_acquire()
@ 2014-03-10 15:01 ali hagigat
  2014-03-10 15:17 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: ali hagigat @ 2014-03-10 15:01 UTC (permalink / raw)
  To: xenomai

rt_mutex_acquire() creates a segmentation fault, why?
-------------- next part --------------
./examp1
inside task2
Segmentation fault (core dumped)


dmesg -c
xtask2[12314]: segfault at 0 ip b7703b38 sp b76ea2a0 error 4 in libnative.so.3.0.0[b7700000+6000]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: examp1.c
Type: text/x-csrc
Size: 1131 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20140310/7cb2f3cd/attachment.c>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] a question about rt_mutex_acquire()
  2014-03-10 15:01 [Xenomai] a question about rt_mutex_acquire() ali hagigat
@ 2014-03-10 15:17 ` Gilles Chanteperdrix
  2014-03-11 12:23   ` ali hagigat
  0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2014-03-10 15:17 UTC (permalink / raw)
  To: ali hagigat; +Cc: xenomai

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] a question about rt_mutex_acquire()
  2014-03-10 15:17 ` Gilles Chanteperdrix
@ 2014-03-11 12:23   ` ali hagigat
  2014-03-18 15:42     ` ali hagigat
  0 siblings, 1 reply; 5+ messages in thread
From: ali hagigat @ 2014-03-11 12:23 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 3/10/14, Gilles Chanteperdrix <gilles.chanteperdrix@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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] a question about rt_mutex_acquire()
  2014-03-11 12:23   ` ali hagigat
@ 2014-03-18 15:42     ` ali hagigat
  2014-03-18 15:47       ` Philippe Gerum
  0 siblings, 1 reply; 5+ messages in thread
From: ali hagigat @ 2014-03-18 15:42 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 3/11/14, ali hagigat <hagigatali@gmail.com> wrote:
> On 3/10/14, Gilles Chanteperdrix <gilles.chanteperdrix@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?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] a question about rt_mutex_acquire()
  2014-03-18 15:42     ` ali hagigat
@ 2014-03-18 15:47       ` Philippe Gerum
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2014-03-18 15:47 UTC (permalink / raw)
  To: ali hagigat, Gilles Chanteperdrix; +Cc: xenomai

On 03/18/2014 04:42 PM, ali hagigat wrote:
> On 3/11/14, ali hagigat <hagigatali@gmail.com> wrote:
>> On 3/10/14, Gilles Chanteperdrix <gilles.chanteperdrix@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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-18 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-10 15:01 [Xenomai] a question about rt_mutex_acquire() ali hagigat
2014-03-10 15:17 ` Gilles Chanteperdrix
2014-03-11 12:23   ` ali hagigat
2014-03-18 15:42     ` ali hagigat
2014-03-18 15:47       ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.