Johan Cockx wrote: > > > On Mon, Oct 11, 2010 at 4:07 PM, Gilles Chanteperdrix > <gilles.chanteperd...@xenomai.org > <mailto:gilles.chanteperd...@xenomai.org>> wrote: > > Johan Cockx wrote: > > A printf in src/skins/posix/select.c confirms that __wrap_select > is called. > > Ok, but there are many branches here, could you check whether it emits > the syscall, and if yes, what is the result of this syscall? > > > First, it executes: > err = XENOMAI_SKINCALL5(__pse51_muxid, __pse51_select, __nfds, > __readfds, __writefds, __exceptfds, __timeout); > (which expands to assembly code; is this the syscall you are referring to?) > > This returns err == -9 ( == -EBADF), so it continues to call > __real_select (which as far as I understand it calls the plain > non-xenomai select) which returns 0 (timeout). > > EBADF suggests that there is something wrong with the file descriptor, > but I have no clue what. The code that creates this file descriptor was > attached to my previous mail (recv.c).
It means that one of the file descriptors you pass to select is not a Xenomai file descriptor. > > Attached is a small stand-alone test case. It consists of two > programs: > > recv.c will wait for a udp message with a timeout of 10 sec (using > > select), and send.c will send a udp message. If recv is started > and then > > send (in another terminal), recv should return immediatly without > > timeout; however, it continues to wait until a timeout occurs. > > By standalone, I meant without RTnet. So, please verify that you also > get the bug without RTnet, and post a mail to the Xenomai-help mailing > list (as opposed to the rtnet mailing list, which is the mailing list > where you are posting currently). > > > I am not sure how to test the bug with Xenomai but without RTnet. If I > replace --posix-cflags and --posix-ldflags by --xeno-flags and > --xeno-ldflags and use a plain (non-rt) IP address, there is no problem. Try posix message queues. -- 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