All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] IDDP send-receive example emits SIGXCPU signal
@ 2011-11-11  7:04 Guvenc Gulce
  2011-11-11 11:43 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Guvenc Gulce @ 2011-11-11  7:04 UTC (permalink / raw)
  To: xenomai@xenomai.org

Hi
My environment looks like the following:
Xenomai 2.5.6 
Used skin: Posix

Kernel 2.6.35.3
Target Environment: ARM


I have compiled the example iddp-sendrecv which can be found under /examples/rtdm/profiles/ipc 
(http://www.xenomai.org/documentation/xenomai-head/html/api/iddp-sendrecv_8c-example.html )

with the existing makefile under the same directory. The binary seems to be linking ok with the 

xenomai libraries as you can also see here:


arm-linux-readelf -d iddp-sendrecv

Dynamic section at offset 0x1ed8 contains 32 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libpthread_rt.so.1]
 0x00000001 (NEEDED)                     Shared library: [libxenomai.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [librt.so.1]
 0x00000001 (NEEDED)                     Shared library: [librtdm.so.1]
 0x00000001 (NEEDED)                     Shared library: [librtdk.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]



In order to test the real-timeliness of this piece of binary, I have added 

one line of code to the beginning of the each thread (client and server)

        pthread_set_mode_np(0, PTHREAD_WARNSW);


so that any switch from Primary to Secondary will be reported with a 

SIGXCPU. My expectation was that I wouldnt see any switch to secondary 

mode as IDDP is supposed to work between real time threads without hurting 

their real-timeliness.

But I do get the SIGXCPU after adding the PTHREAD_WARNSW and the 

gdb output says

Program received signal SIGXCPU, CPU time limit exceeded.
[Switching to Thread 0x2bc83470 (LWP 3401)]
0x2aad9894 in __wrap_socket () from /usr/xenomai/lib/libpthread_rt.so.1


so it looks like the __wrap_socket call in the posix skin hurts the realtimeliness 

of the threads when using IDDP. Do you have any idea why this may be 

happening ?

If we look deeper in the posix skin where __wrap_socket is implemented

        ret = XENOMAI_SKINCALL3(__rtdm_muxid,
                                __rtdm_socket,
                                protocol_family, socket_type, protocol);
        if (ret >= 0)
                ret += __rtdm_fd_start;
        else if (ret == -EAFNOSUPPORT || ret == -ENOSYS) {
                ret = __real_socket(protocol_family, socket_type, protocol);

                if (ret >= __rtdm_fd_start) {
                        __real_close(ret);
                        errno = -EMFILE;
                        ret = -1;
                }


looks like XENOMAI_SKINCALL3 macro is failing for some reason but I can't 

explain this behavior as I am using the example code linked with the correct 

xenomai libraries. Any help would be highly appreciated.

Thanks in advance

Guvenc


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

end of thread, other threads:[~2011-11-23  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11  7:04 [Xenomai-help] IDDP send-receive example emits SIGXCPU signal Guvenc Gulce
2011-11-11 11:43 ` Gilles Chanteperdrix
2011-11-23  8:31   ` Guvenc Gulce
2011-11-23  9:42     ` 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.