All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] problem in pthread_mutex_lock/unlock
@ 2010-06-18 13:52 Nero Fernandez
  2010-06-18 14:12 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: Nero Fernandez @ 2010-06-18 13:52 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 1523 bytes --]

Hi,

Please find an archive attached, containing :
 - a program for testing context-switch-latency using posix-APIs
   for native linux kernel and xenomai-posix-skin (userspace).
 - Makefile to build it using xenomai

In brief, the attempt is to spawn a bunch of pthreads, which share pairs
of read-write pthread-mutexes in a circular fashion, as shown below, and
measure the time taken for to complete a (rel_mtx_0 - acq_mtx_n) by
pthread_0
( - threads try to acquire read mutexes and release write_mutexes)

        pthread_0:write_mtx      =   pthread_1:read_mtx
        pthread_1:write_mtx      =   pthread_2:read_mtx
        ......
        pthread_(n-1):write_mtx  =   pthread_1:write_mtx
        pthread_n:write_mtx      =   pthread_0:read_mtx

The program runs fine on native linux userspace (ARM, x86) , but the
in the xenomai-space, threads lock up at trying to acquire their respective
read_mutexes.

A similar attempt using message-queues runs fine.

Am running a version between 2.5.2 and 2.5.3.
Will try to check with 2.5.3 as well.

Following is my current xeno-config
# ./xeno-config
xeno-config --verbose
        --version="2.5.2"
        --cc="arm-linux-gcc"
        --arch="arm"
        --prefix="/opt/xeno_utils"
        --xeno-cflags="-I/opt/xeno_utils/include -D_GNU_SOURCE -D_REENTRANT
-Wall -pipe -D__XENO__"
        --xeno-ldflags="-L/opt/xeno_utils/lib -lxenomai -lpthread "
        --posix-cflags=""
        --posix-ldflags="-Wl,--wrap,pthread_create
-Wl,--wrap,pthread_setschedparam -Wl,--wrap,"

[-- Attachment #1.2: Type: text/html, Size: 3591 bytes --]

[-- Attachment #2: context_switch_latency.tgz --]
[-- Type: application/x-gzip, Size: 9807 bytes --]

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

end of thread, other threads:[~2010-06-28 21:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-18 13:52 [Xenomai-core] problem in pthread_mutex_lock/unlock Nero Fernandez
2010-06-18 14:12 ` Gilles Chanteperdrix
     [not found]   ` <AANLkTinABTK2nMI0QfZVaULQ4OKwF0678PKOBc_OMIn1@domain.hid>
2010-06-18 14:59     ` [Xenomai-core] Fwd: " Nero Fernandez
2010-06-18 15:08       ` Gilles Chanteperdrix
2010-06-18 19:45         ` Gilles Chanteperdrix
2010-06-23 20:45           ` Nero Fernandez
2010-06-23 22:00             ` Philippe Gerum
2010-06-24 11:35               ` Nero Fernandez
2010-06-24 11:50                 ` Gilles Chanteperdrix
2010-06-24 13:21                   ` Nero Fernandez
2010-06-24 14:14                     ` Gilles Chanteperdrix
2010-06-28 17:53                       ` Nero Fernandez
2010-06-28 19:26                         ` Gilles Chanteperdrix
2010-06-24 20:40                 ` Gilles Chanteperdrix
2010-06-25 15:00                 ` [Xenomai-core] co-kernel benchmarking on arm926 (was: Fwd: problem in pthread_mutex_lock/unlock) Philippe Gerum
2010-06-28 17:50                   ` Nero Fernandez
2010-06-28 21:31                     ` Philippe Gerum
2010-06-28 21:50                     ` [Xenomai-core] co-kernel benchmarking on arm926 Gilles Chanteperdrix

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.