On Feb 5, 7:50 am, Ingo Molnar <[email protected]> wrote:
> i have released the v2.6.20-rt1 kernel, which can be downloaded from the
> usual place:
>
Clean boot for me on ARM ixp4xx (gcc-4.1.1, glibc-2.5, big endian,
softfloat).
High-res timers looks good.
However, I'm trying to use PI mutexes in userspace
(pthread_mutexattr_setprotocol =>
PTHREAD_PRIO_INHERIT) and found strange behaviour. It seems to me that
mutex
is not really locked, ie. first thread locks mutex then second thread also
locks the
same mutex! Then the second mutex unlock it and when the first thread
unlocks the
mutex error EPERM is returned.
What do you think, is it kernel or glibc problem? (Priority ceiling works
as expected.)
Is PTHREAD_PRIO_INHERIT supposed to work on my platform?
If there is anything else what would you like to see from my system, let
me know.
See logs from pi_tests-1.15 => classic_pi.c (I added code that test return
value from
pthread_mutex_lock/pthread_mutex_unlock):
# /mnt/clfs/opt/classic_pi --verbose
main: Priority Inheritance turned on
set_cpu_affinity: using processr 0
main: creating low priority thread
main: creating medium priority thread
main: creating high priority thread
main: releasing all threads
high_priority: running as FIFO thread at priority 97
high_priority: entering ready state
med_priority: running as FIFO thread at priority 96
med_priority: entering ready state
low_priority: running as FIFO thread at priority 95
low_priority: entering ready state
main: all threads initialized, waiting for mutex to be claimed
main: waiting for threads to finish
high_priority: starting inversion loop (1)
high_priority: entering start state (1)
med_priority: starting inversion loop (1)
med_priority: entering start state (1)
low_priority: starting inversion loop (1)
low_priority: entering start wait (1)
high_priority: entering running state
med_priority: entering elevate state
low_priority: claiming mutex
low_priority: mutex locked
low_priority: entering locked wait
high_priority: locking mutex
high_priority: got mutex
high_priority: unlocking mutex
high_priority: entering finish state
low_priority: entering elevated wait
med_priority: entering finish state
low_priority: unlocking mutex
low_priority: mutex unlock failed: 1
low_priority: entering finish wait
high_priority: entering exit state
med_priority: entering exit state
low_priority: entering exit state
main: all threads terminated!
main: test passed
And this is log from kernel (I added prink to sys_futex and do_futex):
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 6
do_futex: op == 6
FUTEX_LOCK_PI
sys_futex: op == 7
do_futex: op == 7
FUTEX_UNLOCK_PI
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 0
do_futex: op == 0
sys_futex: op == 1
do_futex: op == 1
sys_futex: op == 1
do_futex: op == 1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]