Johan Cockx wrote:
> 
> 
> On Tue, Oct 12, 2010 at 3:38 PM, Gilles Chanteperdrix
> <gilles.chanteperd...@xenomai.org
> <mailto:gilles.chanteperd...@xenomai.org>> wrote:
> 
>     Gilles Chanteperdrix wrote:
>     > Johan Cockx wrote:
>     >>
>     >> On Tue, Oct 12, 2010 at 3:04 PM, Gilles Chanteperdrix
>     >> <gilles.chanteperd...@xenomai.org
>     <mailto:gilles.chanteperd...@xenomai.org>
>     >>     > Ok: __real_socket is not called,  the
>     XENOMAI_SKINCALL3(...) code
>     >>     > returns zero in this case.
>     >>
>     >>     Ok. zero should be translated in something like 1024 - 128.
>     And the
>     >>     reverse operation happen in select code.
>     >>
>     >>
>     >> If I understand you correctly,  the socket call is returning a valid
>     >> Xenomai file descriptor as it should.  So, the next question is:
>     why is
>     >> this file descriptor (or the corresponding mask) not recognized
>     as such
>     >> in select()?  Do you have any further suggestions on how to debug
>     this?
>     >
>     > As I just explained. verify that __wrap_socket returns 1024 - 128, or
>     > something like that. And that this value gets translated back to 0 in
>     > select code.
> 
>     Normally, since there is only one file descriptor in the fdset, the test
>     which fails should be first_fp_valid_p.
> 
> 
> I guess you are looking at the kernel code? I was still looking at the
> user space code for __wrap_select.  The arguments of that function are
> as expected: nfds=897, and the bit for file descriptor 896 is set in
> __readfds. I guess the XENOMAI_SKINCALL5 macro expands to a kernel
> call,  but sorry I have little experience with kernel programming.  Does
> this go straight to the __select function in skins/posix/syscall.c?  I
> can see the first_fp_valid_p call there.

You can assume that it goes straight. It is a bit more complex than
that, but the details do not really matter for this case.

> 
> This is the function where I previously put a printk call.  I just
> checked dmesg again,  and the printk'd message now appears (it seems
> that `dmesg | tail -f` isn't working correctly for me, but `dmesg |
> tail` is). Also, when I change syscall.c,  a `make-kpkg --rootcmd
> fakeroot --initrd kernel_image|`| at the top of the source tree somehow
> does not rebuild anything.  Until now, I have done a clean + complete
> rebuild for the whole kernel for each change,  but that takes quite some
> time.  Is there a better way to do this?

Well, build your kernel without make_kpkg. But you can put printks all
over the places in select code, this will save you compilations.

-- 
                                            Gilles.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to