Michael Schnell wrote:
> 
> >futex mutexes should be easy.  The harder bit is TLS.  Switching to
> >NPTL implies both, as far as I know.
> >  
> Sorry for my ignorance. What is TLS and what are the implications ? Do 
> you have any pointers ? There are several requests for NPTL on 
> NIOS-arch. I don't really see the big advantage over old Linux threads, 
> but of course it is nice to provide the most recent stuff...

TLS "Thread Local Storage" is the ability to say

    int __thread i;

And get a variable which is different in each thread, and fast to
access.  You can get a similar effect with standard pthreads and using
macros for every access, but this is better and faster when available.

NPTL's advantages over LinuxThreads which come to mind:

  - Faster to create and destroy threads.

  - No "manager" extra thread memory overhead.

  - Faster to communicate between threads because it doesn't use signals.

  - Futex-based primitives mean mutexes and other synchronisation
    between threads are much faster.

  - You can have inter-process (system-wide) mutexes and other
    synchronisation objects in shared memory.

  - Actually POSIX correct behaviour.  E.g. getpid() returns
    the same value for each thread.  Signals are delivered in the way
    described by POSIX.  Etc.  So more code just works with NPTL.

  - Stopping the whole process with SIGSTOP works properly, and
    killing it with SIGKILL works properly.

  - ps and top show one process, not lots of processes.

-- Jamie
_______________________________________________
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
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to