pthread_cancel() on a SCHED_RR thread hangs

Michael Hunold hunold at
Thu Nov 2 14:01:07 UTC 2006

Hello all,

I'm using uClibc 0.9.28 from a straight forward gcc 4.0.3 toolchain
created with buildroot using a MIPS BE processor.

Please have a look at the attached program.

/opt/mips/bin/mips-linux-uclibc-gcc -static pthread_cancel.c -o
pthread_cancel -lpthread

When being run on the target, you can see that pthread_cancel() does not
return. The "after pthread_cancel()" is not printed, it just hangs:

# ./pthread_cancel
before select()
before pthread_cancel()

When you disable setting SCHED_RR by changing the #if 1 to #if 0, then
the program works as expected.

# ./pthread_cancel
before select()
before pthread_cancel()
after pthread_cancel()

Does anybody have a clue what is going wrong here? Is pthread_cancel()
supposed to work on a SCHED_RR thread?

Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_cancel.c
Type: text/x-csrc
Size: 1856 bytes
Desc: not available
Url : 

More information about the uClibc mailing list