All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
@ 2010-09-20 20:42 ronny meeus
  2010-09-20 20:51 ` Gilles Chanteperdrix
  2010-09-21  7:29 ` Philippe Gerum
  0 siblings, 2 replies; 6+ messages in thread
From: ronny meeus @ 2010-09-20 20:42 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

Hello

I see in the psos.h file the function declaration for both the t_getreg and
the t_setreg functions.
Also in the psos kernel module I see functionality available.
What I miss it the references for both service calls in the syscall.c file.

This results in undefined references if I try to use the service call in my
application.

Is there any patch available that solves my problem?

Thanks
Ronny

[-- Attachment #2: Type: text/html, Size: 443 bytes --]

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

* Re: [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
  2010-09-20 20:42 [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin ronny meeus
@ 2010-09-20 20:51 ` Gilles Chanteperdrix
  2010-09-21  7:29 ` Philippe Gerum
  1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2010-09-20 20:51 UTC (permalink / raw)
  To: ronny meeus; +Cc: xenomai

ronny meeus wrote:
> Hello
> 
> I see in the psos.h file the function declaration for both the t_getreg and
> the t_setreg functions.
> Also in the psos kernel module I see functionality available.
> What I miss it the references for both service calls in the syscall.c file.
> 
> This results in undefined references if I try to use the service call in my
> application.
> 
> Is there any patch available that solves my problem?

I am afraid you will have to write that one... At first sight,
t_setreg/t_getreg would look like TSD, and straight-forward to implement
using pthread_getspecific/pthread_setspecifi, except that these posix
services do not allow to get another thread's TSD.

-- 
                                                                Gilles.


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

* Re: [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
  2010-09-20 20:42 [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin ronny meeus
  2010-09-20 20:51 ` Gilles Chanteperdrix
@ 2010-09-21  7:29 ` Philippe Gerum
  2010-09-21  9:03   ` Stefan Kisdaroczi
  2010-09-21 14:59   ` ronny meeus
  1 sibling, 2 replies; 6+ messages in thread
From: Philippe Gerum @ 2010-09-21  7:29 UTC (permalink / raw)
  To: ronny meeus; +Cc: xenomai

On Mon, 2010-09-20 at 22:42 +0200, ronny meeus wrote:
> Hello
> 
> I see in the psos.h file the function declaration for both the
> t_getreg and the t_setreg functions.
> Also in the psos kernel module I see functionality available.
> What I miss it the references for both service calls in the syscall.c
> file.
> 
> This results in undefined references if I try to use the service call
> in my application.
> 
> Is there any patch available that solves my problem?

Untested:
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=740e3b9e5f77588f3df010752c255ecd24adea4e

> 
> Thanks
> Ronny
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help

-- 
Philippe.




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

* Re: [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
  2010-09-21  7:29 ` Philippe Gerum
@ 2010-09-21  9:03   ` Stefan Kisdaroczi
  2010-09-21 14:59   ` ronny meeus
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Kisdaroczi @ 2010-09-21  9:03 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

On 21.09.2010 09:29, Philippe Gerum wrote:
> On Mon, 2010-09-20 at 22:42 +0200, ronny meeus wrote:
>   
>> Hello
>>
>> I see in the psos.h file the function declaration for both the
>> t_getreg and the t_setreg functions.
>> Also in the psos kernel module I see functionality available.
>> What I miss it the references for both service calls in the syscall.c
>> file.
>>
>> This results in undefined references if I try to use the service call
>> in my application.
>>
>> Is there any patch available that solves my problem?
>>     
> Untested:
> http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=740e3b9e5f77588f3df010752c255ecd24adea4e
>   

Untested too, but the function t_getreg() in task.c uses
__psos_t_setreg: s/setreg/getreg/ ?

>> Thanks
>> Ronny
>> _______________________________________________
>> Xenomai-help mailing list
>> Xenomai-help@domain.hid
>> https://mail.gna.org/listinfo/xenomai-help
>>     
>   



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

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

* Re: [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
  2010-09-21  7:29 ` Philippe Gerum
  2010-09-21  9:03   ` Stefan Kisdaroczi
@ 2010-09-21 14:59   ` ronny meeus
  2010-09-22  6:46     ` Philippe Gerum
  1 sibling, 1 reply; 6+ messages in thread
From: ronny meeus @ 2010-09-21 14:59 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

Hello

There was a small copy-paste issue in your code.
In the file src/skins/psos+/task.c:

+u_long t_setreg(u_long tid, u_long regnum, u_long regvalue)
+{
+       return XENOMAI_SKINCALL3(__psos_muxid, __psos_t_setreg,
+                                tid, regnum, regvalue);
+}
+
+u_long t_getreg(u_long tid, u_long regnum, u_long *regvalue_r)
+{
+       return XENOMAI_SKINCALL3(__psos_muxid, __psos_t_setreg,
+                                tid, regnum, regvalue_r);
+}

The function t_getreg should use __psos_t_getreg instead of __psos_t_setreg.

Once I changed this, the code seems to work.

BTW I'm really impressed by the code-quality and responsiveness of the
Xenomai community.

Best regards,
Ronny

On Tue, Sep 21, 2010 at 9:29 AM, Philippe Gerum <rpm@xenomai.org> wrote:

> On Mon, 2010-09-20 at 22:42 +0200, ronny meeus wrote:
> > Hello
> >
> > I see in the psos.h file the function declaration for both the
> > t_getreg and the t_setreg functions.
> > Also in the psos kernel module I see functionality available.
> > What I miss it the references for both service calls in the syscall.c
> > file.
> >
> > This results in undefined references if I try to use the service call
> > in my application.
> >
> > Is there any patch available that solves my problem?
>
> Untested:
>
> http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=740e3b9e5f77588f3df010752c255ecd24adea4e
>
> >
> > Thanks
> > Ronny
> > _______________________________________________
> > Xenomai-help mailing list
> > Xenomai-help@domain.hid
> > https://mail.gna.org/listinfo/xenomai-help
>
> --
> Philippe.
>
>
>

[-- Attachment #2: Type: text/html, Size: 2396 bytes --]

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

* Re: [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin
  2010-09-21 14:59   ` ronny meeus
@ 2010-09-22  6:46     ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2010-09-22  6:46 UTC (permalink / raw)
  To: ronny meeus; +Cc: xenomai

On Tue, 2010-09-21 at 16:59 +0200, ronny meeus wrote:
> Hello
> 
> There was a small copy-paste issue in your code.
> In the file src/skins/psos+/task.c:
> 
> +u_long t_setreg(u_long tid, u_long regnum, u_long regvalue)
> +{
> +       return XENOMAI_SKINCALL3(__psos_muxid, __psos_t_setreg,
> +                                tid, regnum, regvalue);
> +}
> +
> +u_long t_getreg(u_long tid, u_long regnum, u_long *regvalue_r)
> +{
> +       return XENOMAI_SKINCALL3(__psos_muxid, __psos_t_setreg,
> +                                tid, regnum, regvalue_r);
> +}
> 
> The function t_getreg should use __psos_t_getreg instead of
> __psos_t_setreg.
> 
> Once I changed this, the code seems to work.
> 
> BTW I'm really impressed by the code-quality and responsiveness of the
> Xenomai community.

Ok, thanks. This patch is now on its way to upstream.

> 
> Best regards,
> Ronny
> 
> On Tue, Sep 21, 2010 at 9:29 AM, Philippe Gerum <rpm@xenomai.org>
> wrote:
>         
>         On Mon, 2010-09-20 at 22:42 +0200, ronny meeus wrote:
>         > Hello
>         >
>         > I see in the psos.h file the function declaration for both
>         the
>         > t_getreg and the t_setreg functions.
>         > Also in the psos kernel module I see functionality
>         available.
>         > What I miss it the references for both service calls in the
>         syscall.c
>         > file.
>         >
>         > This results in undefined references if I try to use the
>         service call
>         > in my application.
>         >
>         > Is there any patch available that solves my problem?
>         
>         
>         Untested:
>         http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=740e3b9e5f77588f3df010752c255ecd24adea4e
>         
>         >
>         > Thanks
>         > Ronny
>         > _______________________________________________
>         > Xenomai-help mailing list
>         > Xenomai-help@domain.hid
>         > https://mail.gna.org/listinfo/xenomai-help
>         
>         --
>         Philippe.
>         
>         
> 

-- 
Philippe.




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

end of thread, other threads:[~2010-09-22  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 20:42 [Xenomai-help] t_getreg / t_setreg undefined references in pSOS+ skin ronny meeus
2010-09-20 20:51 ` Gilles Chanteperdrix
2010-09-21  7:29 ` Philippe Gerum
2010-09-21  9:03   ` Stefan Kisdaroczi
2010-09-21 14:59   ` ronny meeus
2010-09-22  6:46     ` 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.