Hi,

Quoting Austin Foxley <[email protected]>:

> On 12/20/2009 02:55 PM, matthieu castet wrote:
> > I resurrected the port of bionic (android libc) thread library I did a
> > year ago.
> > I put it on http://github.com/mat-c/uClibc/commits/uClibc_bionic (also
> > in uClibc_bionic_fixes branch with some other fixes)
>
> Cool! It's _tiny_ ( compared to nptl ).
>
> > - use most of the linux kernel thread features (futex, CLONE_THREAD)
> > unlike old linuxpthread.
>
> Same as nptl here.
>
> > - it doesn't support thread cancellation (see CAVEATS file)
>
> I'm fine with that, I always thought it was a bad interface anyways. The
> added
> bonus of course is that it makes the thread library almost completely
> self-contained (no extensive hacks to libc/).
>
> > - it misses some pthread functions : for example no barrier, missing
> > *timedwait variant, ...
>
> *timedwait is fairly widely used, so that would be probably need to be added.
Now there is a sem_timedwait, pthread_cond_timedwait.
Mutex timedwait is missing but can be added if needed.

>
> > - some theoric race
>
> You mind detailing what those known races are?
There are comments in source code about them :
/* XXX *technically* there is a race condition that could allow
* XXX a signal to be missed. If thread A is preempted in _wait()
* XXX after unlocking the mutex and before waiting, and if other
* XXX threads call signal or broadcast UINT_MAX times (exactly),
* XXX before thread A is scheduled again and calls futex_wait(),
* XXX then the signal will be lost.
*/
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to