Skip to contentSkip to conversation

posix lock_timer fails on tgid invalid

DISCUSSION greenuser 1 participant 1 message Jul 11, 2007

lore
Share & tools
lore

greenuser

author
#0 lore raw

Hello,

On my uClinux nios platform I discovered the following bug:
Suppose the application has a thread, and in this thread the timer_create function is called
Next in the main thread the timer_settime function is called. Now, this function will always fail, in sys_settime a lock_timer function is called.
This lock_timer function checks that timr->it_process->tgid equals current->tgid else
the function fails. With two threads in the application, this check always fails!!!

Note: the same code works fine on a desktop linux system. I already reported this bug to the uClinux forum and the nios forum for a month. So far, without any response.

Why is the check on tgid needed and why does it fail?

Greetings Gerrit