Optimisation status in NPTL

Based on Feb-23-2004 CVS checkout.


Revision Date Changes
A Feb 23, 2004 Initial release
B Apr 05, 2004
  • Conformed page style to site style
  • Added semaphore related functions status
C Apr 07, 2004
  • Added other headers related functions status

Back

Abstract

This document summarizes the differences in NPTL source code between architectures.

It focuses on the functions for which the source code is not common between architectures. It also focuses on the files which are assembly written.

The sources described here are those from glibc CVS - 2004-02-23 checkout. The information given here might be obsolete when you read this.

Go directly to the synthesis

Function list (from pthread.h)

Note: The 'usage in glibc' indicator means:

none:
never used (except maybe in /nptl/tst-xxxx files and in /linuxthreads).
low/avg/high:
it is used in the library 1~5 times / 10~20 times / 50+ times.

Threads

pthread_create()
 - defined in:
        /nptl/pthread_create.c
 - usage in glibc:
        high

pthread_exit()
 - defined in:
        /nptl/pthread_exit.c
 - usage in glibc:
        low

pthread_join()
 - defined in:
        /nptl/pthread_join.c
 - usage in glibc:
        avg

pthread_tryjoin_np()          GNU extension
 - defined in:
        /nptl/pthread_tryjoin.c
 - usage in glibc:
        none

pthread_timedjoin_np()        GNU extension
 - defined in:
        /nptl/pthread_timedjoin.c
 - usage in glibc:
        none

pthread_detach()
 - defined in:
        /nptl/pthread_detach.c
 - usage in glibc:
        none

pthread_self()
 - defined in:
        /nptl/pthread_self.c
 - usage in glibc:
        low

pthread_equal()
 - defined in:
        /nptl/pthread_equal.c
 - usage in glibc:
        none

Threads attributes

pthread_attr_init()
 - defined in:
        /nptl/pthread_attr_init.c
 - usage in glibc:
        avg

pthread_attr_destroy()
 - defined in:
        /nptl/pthread_attr_destroy.c
 - usage in glibc:
        low

pthread_attr_getdetachstate()
 - defined in:
        /nptl/pthread_attr_getdetachstate.c
 - usage in glibc:
        none

pthread_attr_setdetachstate()
 - defined in:
        /nptl/pthread_attr_setdetachstate.c
 - usage in glibc:
        avg

pthread_attr_getguardsize()
 - defined in:
        /nptl/pthread_attr_getguardsize.c
 - usage in glibc:
        none

pthread_attr_setguardsize()
 - defined in:
        /nptl/pthread_attr_setguardsize.c
 - usage in glibc:
        none

pthread_attr_getschedparam()
 - defined in:
        /nptl/pthread_attr_getschedparam.c
 - usage in glibc:
        none

pthread_attr_setschedparam()
 - defined in:
        /nptl/pthread_attr_setschedparam.c
 - usage in glibc:
        none
 
pthread_attr_getschedpolicy()
 - defined in:
        /nptl/pthread_attr_getschedpolicy.c
 - usage in glibc:
        none

pthread_attr_setschedpolicy()
 - defined in:
        /nptl/pthread_attr_setschedpolicy.c
 - usage in glibc:
        none

pthread_attr_getinheritsched()
 - defined in:
        /nptl/pthread_attr_getinheritsched.c
 - usage in glibc:
        none

pthread_attr_setinheritsched()
 - defined in:
        /nptl/pthread_attr_setinheritsched.c
 - usage in glibc:
        none

pthread_attr_getscope()
 - defined in:
        /nptl/pthread_attr_getscope.c
 - usage in glibc:
        none

pthread_attr_setscope()
 - defined in:
        /nptl/pthread_attr_setscope.c
 - usage in glibc:
        none

pthread_attr_getstackaddr()
 - defined in:
        /nptl/pthread_attr_getstackaddr.c
 - usage in glibc:
        none

pthread_attr_setstackaddr()
 - defined in:
        /nptl/pthread_attr_setstackaddr.c
 - usage in glibc:
        none

pthread_attr_getstacksize()
 - defined in:
        /nptl/pthread_attr_getstacksize.c
 - usage in glibc:
        none

pthread_attr_setstacksize()
 - defined in:
        /nptl/pthread_attr_setstacksize.c
 - usage in glibc:
        low

pthread_attr_getstack()       XOPEN extension
 - defined in:
        /nptl/pthread_attr_getstack.c
 - usage in glibc:
        none

pthread_attr_setstack()       XOPEN extension
 - defined in:
        /nptl/pthread_attr_setstack.c
 - usage in glibc:
        none

pthread_attr_setaffinity_np() GNU extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
 - usage in glibc:
        none

pthread_attr_getaffinity_np() GNU extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
 - usage in glibc:
        none

pthread_getattr_np()     GNU extension
 - defined in:
        /nptl/pthread_getattr_np.c
 - usage in glibc:
        none

Scheduling control

pthread_setschedparam()
 - defined in:
        /nptl/pthread_setschedparam.c
 - usage in glibc:
        low

pthread_getschedparam()
 - defined in:
        /nptl/pthread_getschedparam.c 
 - usage in glibc:
        low

pthread_getconcurrency()      XOPEN extension
 - defined in:
        /nptl/pthread_getconcurrency.c
 - usage in glibc:
        none

pthread_setconcurrency()      XOPEN extension
 - defined in:
        /nptl/pthread_setconcurrency.c
 - usage in glibc:
        none

pthread_yield()               GNU extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_yield.c
 - usage in glibc:
        none

pthread_setaffinity_np()      GNU extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c
 - usage in glibc:
        none

pthread_getaffinity_np()      GNU extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c
 - usage in glibc:
        low

Initialization

pthread_once()
 - defined in:
        /nptl/sysdeps/pthread/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
        /nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/s390/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
        /nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
 - usage in glibc:
        avg

Cancelation

pthread_setcancelstate()
 - defined in:
        /nptl/pthread_setcancelstate.c
 - usage in glibc:
        avg

pthread_setcanceltype()
 - defined in:
        /nptl/pthread_setcanceltype.c
 - usage in glibc:
        low

pthread_cancel()
 - defined in:
        /nptl/pthread_cancel.c
 - usage in glibc:
        none

pthread_testcancel()
 - defined in:
        /nptl/pthread_testcancel.c      
 - usage in glibc:
        none

pthread_cleanup_push()
 - defined in:
        /nptl/sysdeps/pthread/pthread.h
 - usage in glibc:
        none
 NOTE: __pthread_cleanup_push() is defined in 
       /nptl/cleanup_compat.c and used a few times in glibc

pthread_cleanup_pop()
 - defined in:
        /nptl/sysdeps/pthread/pthread.h
 - usage in glibc:
        none
 NOTE: __pthread_cleanup_pop() is defined in
       /nptl/cleanup_compat.c and used a few times in glibc.

pthread_cleanup_push_defer_np()  GNU extension
 - defined in:
        /nptl/sysdeps/pthread/pthread.h
 - usage in glibc:
        none
 NOTE: __pthread_cleanup_push_defer() is defined in
       /nptl/cleanup_defer_compat.c and used a few times in glibc.

pthread_cleanup_pop_restore_np() GNU extension
 - defined in:
        /nptl/sysdeps/pthread/pthread.h
 - usage in glibc:
        none
 NOTE: __pthread_cleanup_pop_restore() is defined in
       /nptl/cleanup_defer_compat.c and used a few times in glibc.

Mutex

pthread_mutex_init()
 - defined in:
        /nptl/pthread_mutex_init.c
 - usage in glibc:
        low

pthread_mutex_destroy()
 - defined in:
        /nptl/pthread_mutex_destroy.c
 - usage in glibc:
        low

pthread_mutex_trylock()
 - defined in:
        /nptl/pthread_mutex_trylock.c
 - usage in glibc:
        low

pthread_mutex_lock()
 - defined in:
        /nptl/pthread_mutex_lock.c
 - usage in glibc:
        avg

pthread_mutex_timedlock()     XOPEN extension
 - defined in:
        /nptl/pthread_mutex_timedlock.c
 - usage in glibc:
        none

pthread_mutex_unlock()
 - defined in:
        /nptl/pthread_mutex_unlock.c
 - usage in glibc:
        avg

Mutex attributes

pthread_mutexattr_init()
 - defined in:
        /nptl/pthread_mutexattr_init.c
 - usage in glibc:
        low

pthread_mutexattr_destroy()
 - defined in:
        /nptl/pthread_mutexattr_destroy.c
 - usage in glibc:
        low

pthread_mutexattr_getpshared()
 - defined in:
        /nptl/pthread_mutexattr_getpshared.c
 - usage in glibc:
        none

pthread_mutexattr_setpshared()
 - defined in:
        /nptl/pthread_mutexattr_setpshared.c
 - usage in glibc:
        none

pthread_mutexattr_gettype()   UNIX98 extension
 - defined in:
        /nptl/pthread_mutexattr_gettype.c
 - usage in glibc:
        none

pthread_mutexattr_settype()   UNIX98 extension
 - defined in:
        /nptl/pthread_mutexattr_settype.c
 - usage in glibc:
        none

Read-write locks

pthread_rwlock_init()         UNIX98 extension
 - defined in:
        /nptl/pthread_rwlock_init.c
 - usage in glibc:
        low

pthread_rwlock_destroy()      UNIX98 extension
 - defined in:
        /nptl/pthread_rwlock_destroy.c
 - usage in glibc:
        low

pthread_rwlock_rdlock()       UNIX98 extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_rwlock_rdlock.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
 - usage in glibc:
        avg

pthread_rwlock_tryrdlock()    UNIX98 extension
 - defined in:
        /nptl/pthread_rwlock_tryrdlock.c
 - usage in glibc:
        low

pthread_rwlock_timedrdlock()  UNIX98 + XOPEN extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
 - usage in glibc:
        none

pthread_rwlock_wrlock()       UNIX98 extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_rwlock_wrlock.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
 - usage in glibc:
        low

pthread_rwlock_trywrlock()    UNIX98 extension
 - defined in:
        /nptl/pthread_rwlock_trywrlock.c
 - usage in glibc:
        low

pthread_rwlock_timedwrlock()  UNIX98 + XOPEN extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
 - usage in glibc:
        low

pthread_rwlock_unlock()       UNIX98 extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_rwlock_unlock.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
 - usage in glibc:
        avg

Read-write locks attributes

pthread_rwlockattr_init()     UNIX98 extension
 - defined in:
       /nptl/pthread_rwlockattr_init.c 
 - usage in glibc:
       none

pthread_rwlockattr_destroy()  UNIX98 extension
 - defined in:
        /nptl/pthread_rwlockattr_destroy.c
 - usage in glibc:
        none

pthread_rwlockattr_getpshared() UNIX98 extension
 - defined in:
        /nptl/pthread_rwlockattr_getpshared.c
 - usage in glibc:
        none

pthread_rwlockattr_setpshared() UNIX98 extension
 - defined in:
        /nptl/pthread_rwlockattr_setpshared.c
 - usage in glibc:
        none

pthread_rwlockattr_getkind_np() UNIX98 extension
 - defined in:
        /nptl/pthread_rwlockattr_getkind_np.c
 - usage in glibc:
        none

pthread_rwlockattr_setkind_np() UNIX98 extension
 - defined in:
        /nptl/pthread_rwlockattr_setkind_np.c
 - usage in glibc:
        none

Conditional variables

pthread_cond_init()
 - defined in:
        /nptl/pthread_cond_init.c
 - usage in glibc:
        avg

pthread_cond_destroy()
 - defined in:
        /nptl/pthread_cond_destroy.c
 - usage in glibc:
        avg

pthread_cond_signal()
 - defined in:
        /nptl/sysdeps/pthread/pthread_cond_signal.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
 - usage in glibc:
        avg

pthread_cond_broadcast()
 - defined in:
        /nptl/sysdeps/pthread/pthread_cond_broadcast.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
 - usage in glibc:
        low

pthread_cond_wait()
 - defined in:
        /nptl/sysdeps/pthread/pthread_cond_wait.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
 - usage in glibc:
        avg

pthread_cond_timedwait()
 - defined in:
        /nptl/sysdeps/pthread/pthread_cond_timedwait.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
 - usage in glibc:
        avg

Conditional variables attributes

pthread_condattr_init()
 - defined in:
        /nptl/pthread_condattr_init.c
 - usage in glibc:
        none

pthread_condattr_destroy()
 - defined in:
        /nptl/pthread_condattr_destroy.c
 - usage in glibc:
        none

pthread_condattr_getpshared()
 - defined in:
        /nptl/pthread_condattr_getpshared.c
 - usage in glibc:
        none

pthread_condattr_setpshared()
 - defined in:
        /nptl/pthread_condattr_setpshared.c
 - usage in glibc:
        none

pthread_condattr_getclock()   XOPEN extension
 - defined in:
        /nptl/pthread_condattr_getclock.c
 - usage in glibc:
        none

pthread_condattr_setclock()   XOPEN extension
 - defined in:
        /nptl/pthread_condattr_setclock.c
 - usage in glibc:
        none

Spinlocks

pthread_spin_init()           XOPEN extension
 - defined in:
        /nptl/sysdeps/i386/pthread_spin_unlock.S
        /nptl/sysdeps/pthread/pthread_spin_init.c
        /nptl/sysdeps/s390/pthread_spin_unlock.c
        /nptl/sysdeps/sh/pthread_spin_unlock.S
        /nptl/sysdeps/x86_64/pthread_spin_unlock.S
 - usage in glibc:
        none

pthread_spin_destroy()        XOPEN extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_spin_destroy.c
 - usage in glibc:
        none

pthread_spin_lock()           XOPEN extension
 - defined in:
        /nptl/sysdeps/alpha/pthread_spin_lock.S
        /nptl/sysdeps/i386/pthread_spin_lock.c
        /nptl/sysdeps/ia64/pthread_spin_lock.c
        /nptl/sysdeps/powerpc/pthread_spin_lock.c
        /nptl/sysdeps/s390/pthread_spin_lock.c
        /nptl/sysdeps/sh/pthread_spin_lock.c
        /nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c
        /nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c
 - usage in glibc:
        none

pthread_spin_trylock()        XOPEN extension
 - defined in:
        /nptl/sysdeps/alpha/pthread_spin_trylock.S
        /nptl/sysdeps/i386/i486/pthread_spin_trylock.S
        /nptl/sysdeps/ia64/pthread_spin_trylock.c
        /nptl/sysdeps/powerpc/pthread_spin_trylock.c
        /nptl/sysdeps/s390/pthread_spin_trylock.c
        /nptl/sysdeps/sh/pthread_spin_trylock.S
        /nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c
        /nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c
        /nptl/sysdeps/x86_64/pthread_spin_trylock.S
 - usage in glibc:
        none

pthread_spin_unlock()         XOPEN extension
 - defined in:
        /nptl/sysdeps/i386/pthread_spin_unlock.S
        /nptl/sysdeps/ia64/pthread_spin_unlock.c
        /nptl/sysdeps/pthread/pthread_spin_unlock.c
        /nptl/sysdeps/s390/pthread_spin_unlock.c
        /nptl/sysdeps/sh/pthread_spin_unlock.S
        /nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c
        /nptl/sysdeps/x86_64/pthread_spin_unlock.S
 - usage in glibc:
        none

Barriers

pthread_barrier_init()        XOPEN extension
 - defined in:
        /nptl/pthread_barrier_init.c
 - usage in glibc:
        none

pthread_barrier_destroy()     XOPEN extension
 - defined in:
        /nptl/pthread_barrier_destroy.c
 - usage in glibc:
        none

pthread_barrier_wait()        XOPEN extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_barrier_wait.c
        /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
        /nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
        /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
 - usage in glibc:
        none

Barriers attributes

pthread_barrierattr_init()    XOPEN extension
 - defined in:
        /nptl/pthread_barrierattr_init.c
 - usage in glibc:
        none

pthread_barrierattr_destroy() XOPEN extension
 - defined in:
        /nptl/pthread_barrierattr_destroy.c
 - usage in glibc:
        none

pthread_barrierattr_getpshared() XOPEN extension
 - defined in:
        /nptl/pthread_barrierattr_getpshared.c
 - usage in glibc:
        none

pthread_barrierattr_setpshared() XOPEN extension
 - defined in:
        /nptl/pthread_barrierattr_setpshared.c
 - usage in glibc:
        none

Thread-specific data

pthread_key_create()
 - defined in:
        /nptl/pthread_key_create.c
 - usage in glibc:
        low

pthread_key_delete()
 - defined in:
        /nptl/pthread_key_delete.c
 - usage in glibc:
        low

pthread_getspecific()
 - defined in:
        /nptl/pthread_getspecific.c
 - usage in glibc:
        low

pthread_setspecific()
 - defined in:
        /nptl/pthread_setspecific.c
 - usage in glibc:
        low

Others

pthread_getcpuclockid()      XOPEN extension
 - defined in:
        /nptl/sysdeps/pthread/pthread_getcpuclockid.c
 - usage in glibc:
        none

pthread_atfork()
 - defined in:
        /nptl/pthread_atfork.c
 - usage in glibc:
        low

Function list (from semaphore.h)

sem_init()
 - defined in:
        /nptl/sem_init.c
 - usage in glibc:
        none

sem_destroy()
 - defined in:
        /nptl/sem_destroy.c
 - usage in glibc:
        none

sem_open()
 - defined in:
        /nptl/sem_open.c
 - usage in glibc:
        none

sem_close()
 - defined in:
        /nptl/sem_close.c
 - usage in glibc:
        none

sem_unlink()
 - defined in:
        /nptl/sem_unlink.c
 - usage in glibc:
        none

sem_wait()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sem_wait.c
	/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
	/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
	/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
 - usage in glibc:
        none

sem_timedwait()         XOPEN extension
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
	/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
	/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
	/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
 - usage in glibc:
        none

sem_trywait()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sem_trywait.c
	/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
	/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S
	/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
 - usage in glibc:
        none

sem_post()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sem_post.c
	/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
	/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c
	/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
	/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
 - usage in glibc:
        none

sem_getvalue()
 - defined in:
        /nptl/sem_getvalue.c
 - usage in glibc:
        none

Function list (from signal.h, unistd.h, time.h, stdio.h)

raise()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/raise.c
 - usage in glibc:
        low

sigtimedwait()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sigtimedwait.c
 - usage in glibc:
        none

sigwait()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sigwait.c
 - usage in glibc:
        none

sigwaitinfo()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c
 - usage in glibc:
        none

pthread_sigmask()
 - defined in:
        /nptl/sysdeps/pthread/pthread_sigmask.c
 - usage in glibc:
        none

pthread_kill()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/pthread_kill.c
 - usage in glibc:
        low

sigaction()
 - defined in:
        /nptl/sysdeps/pthread/sigaction.c
 - usage in glibc:
        high

sigfillset()
 - defined in:
        /nptl/sysdeps/pthread/sigfillset.c
 - usage in glibc:
        avg

sigprocmask()
 - defined in:
        /nptl/sysdeps/pthread/sigprocmask.c
 - usage in glibc:
        avg

__libc_current_sigrtmin(), __libc_current_sigrtmax()
 - defined in:
        /nptl/sysdeps/unix/sysv/linux/allocrtsig.c
 - usage in glibc:
        low


fork()
 - defined in:
	/nptl/sysdeps/unix/sysv/linux/fork.c
   (with parts in:)
        /nptl/sysdeps/unix/sysv/linux/alpha/fork.c
	/nptl/sysdeps/unix/sysv/linux/i386/fork.c
	/nptl/sysdeps/unix/sysv/linux/ia64/fork.c
	/nptl/sysdeps/unix/sysv/linux/s390/fork.c
	/nptl/sysdeps/unix/sysv/linux/sh/fork.c
	/nptl/sysdeps/unix/sysv/linux/sparc/fork.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
 - usage in glibc:
        high

vfork()
 - defined in:
 	/sysdeps/generic/vfork.c
	/sysdeps/unix/bsd/hp/m68k/vfork.S
	/sysdeps/unix/bsd/i386/vfork.S
	/sysdeps/unix/bsd/sun/m68k/vfork.S
	/sysdeps/unix/bsd/ultrix4/mips/vfork.S
	/sysdeps/unix/bsd/vax/vfork.S
	/sysdeps/unix/i386/vfork.S
	/sysdeps/unix/sparc/vfork.S
	/sysdeps/unix/sysv/linux/vfork.c
	/sysdeps/unix/sysv/linux/arm/vfork.S
	/sysdeps/unix/sysv/linux/cris/vfork.S
	/sysdeps/unix/sysv/linux/i386/vfork.S
	/sysdeps/unix/sysv/linux/ia64/vfork.S
	/sysdeps/unix/sysv/linux/m68k/vfork.S
	/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
	/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
	/sysdeps/unix/sysv/linux/sh/vfork.S
	/sysdeps/unix/sysv/linux/sparc/vfork.S
	/sysdeps/unix/sysv/linux/x86_64/vfork.S
	/sysdeps/unix/sysv/sysv4/i386/vfork.S 
   The following files are also related to this function:
        /nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/ia64/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
	/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S 
 - usage in glibc:
        low

getpid()
 - defined in:
	/nptl/sysdeps/unix/sysv/linux/getpid.c
 - usage in glibc:
        low


timer_create()
 - defined in:
	/nptl/sysdeps/pthread/timer_create.c
	/nptl/sysdeps/unix/sysv/linux/timer_create.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c 
 - usage in glibc:
        none

timer_delete()
 - defined in:
 	/nptl/sysdeps/pthread/timer_delete.c
	/nptl/sysdeps/unix/sysv/linux/timer_delete.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c 
 - usage in glibc:
        none

timer_getoverr()
 - defined in:
 	/nptl/sysdeps/pthread/timer_getoverr.c
	/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c
 - usage in glibc:
        none

timer_gettime()
 - defined in:
 	/nptl/sysdeps/pthread/timer_gettime.c
	/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
 - usage in glibc:
        none

timer_settime()
 - defined in:
 	/nptl/sysdeps/pthread/timer_settime.c
	/nptl/sysdeps/unix/sysv/linux/timer_settime.c
	/nptl/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
 - usage in glibc:
        none


flockfile()
 - defined in:
 	/nptl/sysdeps/pthread/flockfile.c
 - usage in glibc:
        high

ftrylockfile()
 - defined in:
 	/nptl/sysdeps/pthread/ftrylockfile.c
 - usage in glibc:
        none

funlockfile()
 - defined in:
 	/nptl/sysdeps/pthread/funlockfile.c
 - usage in glibc:
        high

Synthesis

Architecture-dependent implementation in NPTL

Function Architecture Language Remarks
pthread_once() generic C Incomplete implementation
linux/alpha C  
linux/i386 Assembler  
linux/ia64 C  
linux/ppc C  
linux/s390 C  
linux/sh Assembler  
linux/sparc C  
linux/x86_64 C  
pthread_rwlock_rdlock() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_rwlock_timedrdlock() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_rwlock_wrlock() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_rwlock_timedwrlock() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_rwlock_unlock() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_cond_signal() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_cond_broadcast() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_cond_wait() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_cond_timedwait() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
pthread_spin_init() generic C  
*/i386 Assembler  
*/s390 C  
*/sh Assembler  
*/x86_64 Assembler  
pthread_spin_lock() */alpha Assembler  
*/i386 Assembler  
*/ia64 C  
*/ppc C  
*/s390 C  
*/sh Assembler  
*/sparc32 C  
*/sparc64 C  
*/x86_64 Assembler  
pthread_spin_unlock() generic C  
*/i386 Assembler  
*/ia64 C  
*/s390 C  
*/sh Assembler  
*/sparc64 C  
*/x86_64 Assembler  
pthread_barrier_wait() generic C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
sem_wait() linux/* C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
sem_timedwait() linux/* C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
sem_trywait() linux/* C  
linux/i386 Assembler  
linux/sh Assembler  
linux/x86_64 Assembler  
sem_post() linux/* C  
linux/i386 Assembler  
linux/ppc C  
linux/sh Assembler  
linux/x86_64 Assembler  
vfork() generic C  
bsd/hp Assembler  
bsd/i386 Assembler  
bsd/sun Assembler  
bsd/ultrix4 Assembler  
bsd/vax Assembler  
generic/i386 Assembler  
generic/sparc Assembler  
linux/* C  
linux/arm Assembler  
linux/cris Assembler  
linux/i386 Assembler  
linux/ia64 Assembler  
linux/m68k Assembler  
linux/powerpc32 Assembler  
linux/powerpc64 Assembler  
linux/sh Assembler  
linux/sparc Assembler  
linux/x86_64 Assembler  
sysv4/i386 Assembler  
timer_create() generic C  
linux/* C  
linux/*64bits C  
timer_delete() generic C  
linux/* C  
linux/*64bits C  
timer_getoverr() generic C  
linux/* C  
linux/*64bits C  
timer_gettime() generic C  
linux/* C  
linux/*64bits C  
timer_settime() generic C  
linux/* C  
linux/*64bits C  

Conclusion

As the previous table shows, the ia64 functions are not as optimized as the i386 and the x86-64 ones. This means that some key features which are continuously used in many software (rwlocks, conditional variables...) will be at best a little slower, and possibly will have unusefull code inside - for example the pthread_barrier_wait() had an additional lock() in generic version until 2004-02-20 changes by Jakub Jelinek.

This table also shows that we can have different bugs from an architecture to another, as some functions use slightly different algorithms. The testing effort must be the same on each target, and it cannot be assumed that if a feature works fine on i386, it shall be OK on ia64 or powerPC.