[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclinux-dev
Subject:    Re: [uClinux-dev] patch for semaphore of pthread lib
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2006-10-26 0:03:10
Message-ID: 200610252003.10852.vapier () gentoo ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 25 October 2006 16:50, Falk Brettschneider wrote:
> 1) I replaced all occurrences of the internally used helper mutex
> __sem_lock with local_[dis|en]able_irq() in semaphore.c

that'll never fly in general ... irq control is the domain of kernel space and 
no where else

> 2) I avoid locking 
> on the other internal helper mutex (in function
> __pthread_set_own_extricate_if() in spinlock.h) for all threads which are
> configured as PTHREAD_CANCEL_DISABLE.

i dont understand why

> Both changes safe me from total hangs of my application

while the patches may be ok for you (and i'm glad you have a working system), 
the proposed changes certainly arent suitable for general inclusion

> LinuxThreads don't provide mutex priority inheritance.

correct ... there are different aspects of linuxthreads where it does not 
conform to POSIX or where it omits optional features such as this ...

http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutexattr_setprotocol.html
pthread_mutexattr_setprotocol is part of the Thread Priority Inheritance (TPI) 
and since it is optional, linuxthreads doesnt bother to support it

> Is the patch OK?

for you, sure ... for everyone else, no
-mike

[Attachment #5 (application/pgp-signature)]

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic